libmicrohttpd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [libmicrohttpd] External select mode limited to 1024 FDs


From: Christian Grothoff
Subject: Re: [libmicrohttpd] External select mode limited to 1024 FDs
Date: Wed, 11 Mar 2015 18:41:26 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.5.0

It does, it's just a bit tricky to do right. You need to make sure you
set the correct #defines before anything else consistently across the build:

#if LINUX
#include <features.h>
#if (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2)
# include <bits/types.h>
# undef __FD_SETSIZE
# define __FD_SETSIZE 8192
#endif
#else
#define FD_SETSIZE 65536
#endif

Do this before you #include anything else in all C files, and you should
be fine.

-Christian

On 03/11/2015 04:34 PM, Luke Dashjr wrote:
> On Thursday, March 05, 2015 9:49:57 AM Christian Grothoff wrote:
>> Also, redefining FD_SETSIZE is also IMO a very good possibility.
> 
> Note this does not work on glibc systems.
> 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]