Permalink
Browse files

Fix Winsock2 64 sockets limit (thanks Tom)

  • Loading branch information...
1 parent 15b1f40 commit fc9714c8a924bdb52ec1ee5b9c29114b42c4ac3d @dmajkic committed Nov 9, 2011
Showing with 20 additions and 2 deletions.
  1. +5 −2 deps/hiredis/hiredis.c
  2. +3 −0 deps/hiredis/hiredis.h
  3. +3 −0 deps/hiredis/net.c
  4. +3 −0 src/redis-cli.c
  5. +3 −0 src/win32fixes.c
  6. +3 −0 src/win32fixes.h
View
7 deps/hiredis/hiredis.c
@@ -42,8 +42,11 @@
#include "util.h"
#ifdef _WIN32
-#include <winsock2.h>
-#include <windows.h>
+ #ifndef FD_SETSIZE
+ #define FD_SETSIZE 16000
+ #endif
+ #include <winsock2.h>
+ #include <windows.h>
#endif
typedef struct redisReader {
View
3 deps/hiredis/hiredis.h
@@ -35,6 +35,9 @@
#include <stdarg.h> /* for va_list */
#include <sys/time.h> /* for struct timeval */
#ifdef _WIN32
+ #ifndef FD_SETSIZE
+ #define FD_SETSIZE 16000
+ #endif
#include <winsock2.h>
#include <windows.h>
#endif
View
3 deps/hiredis/net.c
@@ -33,6 +33,9 @@
#include "fmacros.h"
#include <sys/types.h>
#ifdef _WIN32
+ #ifndef FD_SETSIZE
+ #define FD_SETSIZE 16000
+ #endif
#include "winsock2.h"
#include "windows.h"
#define socklen_t int
View
3 src/redis-cli.c
@@ -43,6 +43,9 @@
#ifdef _WIN32
#include <fcntl.h>
+ #ifndef FD_SETSIZE
+ #define FD_SETSIZE 16000
+ #endif
#include <winsock2.h>
#include <windows.h>
#include "win32fixes.h"
View
3 src/win32fixes.c
@@ -3,6 +3,9 @@
#include <process.h>
#include <stdlib.h>
#include <errno.h>
+#ifndef FD_SETSIZE
+ #define FD_SETSIZE 16000
+#endif
#include <winsock2.h>
#include <windows.h>
#include <signal.h>
View
3 src/win32fixes.h
@@ -18,6 +18,9 @@
#include <io.h>
#include <signal.h>
#include <sys/types.h>
+ #ifndef FD_SETSIZE
+ #define FD_SETSIZE 16000
+ #endif
#include <winsock2.h> /* setsocketopt */
#include <ws2tcpip.h>
#include <windows.h>

0 comments on commit fc9714c

Please sign in to comment.