Move #define for random() into the test applications where needed
authorPatrick Gansterer <paroga@paroga.com>
Sat, 29 Mar 2014 07:05:07 +0000 (08:05 +0100)
committerPatrick Gansterer <paroga@paroga.com>
Sat, 29 Mar 2014 07:05:07 +0000 (08:05 +0100)
test-server/test-client.c
test-server/test-fraggle.c
win32port/win32helpers/websock-w32.h

index 75fd133..a3c3d4b 100644 (file)
@@ -25,7 +25,9 @@
 #include <string.h>
 #include <signal.h>
 
-#ifndef _WIN32
+#ifdef _WIN32
+#define random rand
+#else
 #include <unistd.h>
 #endif
 
index 578f947..c2529df 100644 (file)
@@ -24,7 +24,9 @@
 #include <getopt.h>
 #include <string.h>
 
-#ifndef _WIN32
+#ifdef _WIN32
+#define random rand
+#else
 #include <sys/time.h>
 #include <unistd.h>
 #endif
index 6c74c0c..9e30456 100644 (file)
@@ -14,8 +14,6 @@
 
 #define SOL_TCP IPPROTO_TCP
 
-#define random rand
-
 #ifdef  __MINGW64__                                                             
 #define DEF_POLL_STUFF
 #endif