[Fedora-packaging] Override with -D_FORTIFY_SOURCE=0 as workaround allowed?

Tom Lane tgl at redhat.com
Tue Jan 10 01:41:07 UTC 2012


Robert Scheck <robert at fedoraproject.org> writes:
> [ _FORTIFY_SOURCE=2 breaks non-default FD_SETSIZE settings ]

So far as I can see from the sys/select.h header file, there is no
intention for glibc to support overriding the value of FD_SETSIZE;
certainly, doing so doesn't affect sizeof(struct fd_set).  It's possible
that it'd work if you don't use that struct declaration, but then you're
definitely outside the boundaries of what can be called portable code.
So while you'll probably want an authoritative opinion from a glibc
maintainer, I'd venture that overriding FD_SETSIZE is a nonportable
BSD-ism.

I think the reason this hasn't been complained of too much is that
it's generally better to use poll(2) instead of select(2) if your
program can have a lot of file descriptors open.  Have the Zarafa
developers considered offering a poll()-based option?

			regards, tom lane


More information about the packaging mailing list