Skip to content

Commit 66aef7d

Browse files
authored
Merge pull request #170 from AlexLanzano/timespec-fix
Define ONE_MS only when in POSIX environment
2 parents b2ac5c3 + 733b649 commit 66aef7d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test/wh_test_comm.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@
4747
#include <time.h> /* For nanosleep */
4848
#include "port/posix/posix_transport_tcp.h"
4949
#include "port/posix/posix_transport_shm.h"
50+
51+
const struct timespec ONE_MS = { .tv_sec = 0, .tv_nsec = 1000000 };
5052
#endif
5153

5254
#include "wh_test_comm.h"
@@ -56,7 +58,6 @@
5658
#define RESP_SIZE 64
5759
#define REPEAT_COUNT 10
5860

59-
const struct timespec ONE_MS = { .tv_sec = 0, .tv_nsec = 1000000 };
6061

6162
#if defined(WOLFHSM_CFG_ENABLE_CLIENT) && defined(WOLFHSM_CFG_ENABLE_SERVER)
6263
int whTest_CommMem(void)

0 commit comments

Comments
 (0)