LRN: Fixing Mantis #1974: On W32 winsock2.h defines FD_SETSIZE (if it was not defined...
authorChristian Grothoff <christian@grothoff.org>
Tue, 6 Dec 2011 12:49:06 +0000 (12:49 +0000)
committerChristian Grothoff <christian@grothoff.org>
Tue, 6 Dec 2011 12:49:06 +0000 (12:49 +0000)
The patch attached should increase the limit to 1024.

src/include/platform.h
src/include/winproc.h
src/nat/gnunet-helper-nat-client-windows.c
src/nat/gnunet-helper-nat-server-windows.c

index aa24347316311d703545ac07e8c94ac34a145820..8c1e6d601e1131abc9443f2fd0c9258b75a6b592 100644 (file)
@@ -77,6 +77,9 @@
 #endif
 
 #ifdef _MSC_VER
+#ifndef FD_SETSIZE
+#define FD_SETSIZE 1024
+#endif
 #include <Winsock2.h>
 #include <ws2tcpip.h>
 #else
index 74e41edc95fd4e11a6e7d6f88074691cf5edeb07..e65a3b55c9e4eb2c10d405d37463cf38add7829a 100644 (file)
@@ -34,6 +34,9 @@
 #include <sys/timeb.h>
 #include <time.h>
 #include <dirent.h>
+#ifndef FD_SETSIZE
+#define FD_SETSIZE 1024
+#endif
 #include <winsock2.h>
 #include <ws2tcpip.h>
 #include <windows.h>
index 864c911b0338de90a88537f3932e4a99cb8ec56a..47fbc0b86583f027687ab9a6cc2f5802bf6c1c3c 100644 (file)
@@ -43,6 +43,7 @@
  */
 #define _GNU_SOURCE
 
+#define FD_SETSIZE 1024
 #include <winsock2.h>
 #include <ws2tcpip.h>
 #include <sys/time.h>
index 8386a15b14aa3624d85137378a90fee7e8dbf111..b15752d8ec948bfe6dbf67d00bf7e0cd4a04840c 100644 (file)
@@ -42,7 +42,7 @@
  */
 #define _GNU_SOURCE
 
-
+#define FD_SETSIZE 1024
 #include <winsock2.h>
 #include <ws2tcpip.h>
 #include <sys/time.h>