Ask sysconf for Android's getdtablesize.
authorDan Albert <danalbert@google.com>
Fri, 12 Feb 2016 00:13:27 +0000 (16:13 -0800)
committerAndy Green <andy.green@linaro.org>
Fri, 12 Feb 2016 00:58:16 +0000 (08:58 +0800)
lib/libwebsockets.h

index 47a034b..fb480dc 100644 (file)
@@ -163,7 +163,8 @@ struct sockaddr_in;
 #endif
 
 #if defined(__ANDROID__)
-#define getdtablesize() 1024
+#include <unistd.h>
+#define getdtablesize() sysconf(_SC_OPEN_MAX)
 #endif
 
 #endif