summaryrefslogtreecommitdiff
path: root/tests/stress1.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/stress1.c')
-rw-r--r--tests/stress1.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/tests/stress1.c b/tests/stress1.c
index fb50124..e4dbbd2 100644
--- a/tests/stress1.c
+++ b/tests/stress1.c
@@ -111,7 +111,11 @@ enum {
struct timespec *
millisecondsFromNow (struct timespec * time, int millisecs)
{
+#if (defined(__MINGW64__) || defined(__MINGW32__)) && __MSVCRT_VERSION__ >= 0x0601
+ struct __timeb64 currSysTime;
+#else
struct _timeb currSysTime;
+#endif
int64_t nanosecs, secs;
const int64_t NANOSEC_PER_MILLISEC = 1000000;
const int64_t NANOSEC_PER_SEC = 1000000000;
@@ -141,9 +145,9 @@ millisecondsFromNow (struct timespec * time, int millisecs)
void *
masterThread (void * arg)
{
- int dither = (int) arg;
+ int dither = (int)(size_t)arg;
- timeout = (int) arg;
+ timeout = (int)(size_t)arg;
pthread_barrier_wait(&startBarrier);
@@ -239,7 +243,7 @@ main ()
assert(pthread_barrier_init(&readyBarrier, NULL, 3) == 0);
assert(pthread_barrier_init(&holdBarrier, NULL, 3) == 0);
- assert(pthread_create(&master, NULL, masterThread, (void *) timeout) == 0);
+ assert(pthread_create(&master, NULL, masterThread, (void *)(size_t)timeout) == 0);
assert(pthread_create(&slave, NULL, slaveThread, NULL) == 0);
allExit = FALSE;