Re: [ANNOUNCE] keepalived 2.0.1
Patrick Schaaf <[email protected]> Fri, 15 Jun 2018 21:39:18 +0200
| Newsgroups | gmane.linux.keepalived.devel |
|---|---|
| Message-ID | <CAJ26g5T7AJuQrxmHCX7z63JLC8GFqLShShcS35krxskStKi_FA@mail.gmail.com> |
On Fri, Jun 15, 2018 at 7:19 PM, Quentin Armitage <[email protected]> wrote: > I have tried the following little test: > > #define __FD_SETSIZE 2048 > #define FD_SETSIZE 2048 > > #include <sys/select.h> > > int main(int argc, char **argv) > { > fd_set q; > > FD_ZERO(&q); > FD_SET(1280, &q); > } > > > If this is compiled with -D_FORTIFY_SOURCE=1 -O gcc options, then when it > runs it aborts due to 1280 >= 1024. Yeah, sorry, seems the trick no longer works nowadays. Just had a look at the headers (glibc 2.18), and find __FD_SETSIZE is unconditionally defined to 1024 in linux/posix_types.h and bits/typesizes.h. Back in the days I remember these had an #ifndef __FD_SETSIZE around them, but that's no longer there. Further hacking, as Andras alluded to, is probably not worth the support hassle (and performance cost it will always have), compared to switch to a more modern alternative. best regards Patrick ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot