v3-4-ctdb: Work around the 1024-fd limit in select
[obnox/samba-ctdb.git] / 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