v3-4-ctdb: Work around the 1024-fd limit in select
authorVolker Lendecke <vl@samba.org>
Wed, 2 Feb 2011 12:08:40 +0000 (05:08 -0700)
committerVolker Lendecke <vl@samba.org>
Wed, 2 Feb 2011 13:35:43 +0000 (14:35 +0100)
This is an extremely dirty hack that just postpones the problem that select
only allows 1024 file descriptors to be queried by increasing the limit
to 16384.

lib/replace/replace.h

index c5b8676acfa6e8baadc9ca9e87547cfba7577e6c..c16964eebec33c94f42de126c4919293df7b92de 100644 (file)
 #include "config.h"
 #endif
 
+#include <features.h>
+#if (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2)
+# include <bits/types.h>
+# undef __FD_SETSIZE
+# define __FD_SETSIZE 16384
+#endif
+
 #ifdef HAVE_STANDARDS_H
 #include <standards.h>
 #endif