fix mcapi test on unix

This commit is contained in:
toddouska 2013-12-02 12:04:22 -08:00
parent 4c62e7ef9e
commit cf545ca692
2 changed files with 6 additions and 2 deletions

View File

@ -6,7 +6,7 @@ if BUILD_MCAPI
check_PROGRAMS += mcapi/test
noinst_PROGRAMS += mcapi/test
mcapi_test_SOURCES = mcapi/crypto.c \
mcapi/test.c
mcapi/mcapi_test.c
mcapi_test_LDADD = src/libcyassl.la
mcapi_test_DEPENDENCIES = src/libcyassl.la
endif

View File

@ -53,7 +53,7 @@
#include <stdlib.h>
#include "PIC32MZ-serial.h"
#define SYSTEMConfigPerformance /* void out SYSTEMConfigPerformance(); */
#else
#elif defined(MICROCHIP_PIC32)
#define PIC32_STARTER_KIT
#include <stdio.h>
#include <stdlib.h>
@ -61,6 +61,8 @@
#include <plib.h>
#include <sys/appio.h>
#define init_serial() /* void out init_serial() */
#else
#include <stdio.h> /* order matters above ? */
#endif
#define OUR_DATA_SIZE 1024
static byte ourData[OUR_DATA_SIZE];
@ -93,9 +95,11 @@ int main(int argc, char** argv)
(void)argc;
(void)argv;
#if defined(MICROCHIP_PIC32)
init_serial() ; /* initialize PIC32MZ serial I/O */
SYSTEMConfigPerformance(80000000);
DBINIT();
#endif
/* align key, iv pointers */
key = (byte*)XMALLOC(32, NULL, DYNAMIC_TYPE_KEY);