poll.h incompatible with gcc -std=c99
It seems that sys/signal.h does not define sigset_t in standard C mode. Here is a very quick way to demonstrate the problem:
echo "#include <poll.h>" > /tmp/polltest.c
gcc -std=c99 /tmp/polltest.c
You'll see this error:
In file included from /tmp/polltest.c:1:0:
/usr/include/poll.h:51:18: error: unknown type name 'sigset_t'
poll.h does include <signal.h>, which includes <sys/signal.h>, which in turn defines sigset_t. However, the definition of sigset_t is wrapped in:
#if defined(EXTENSIONS) || defined(KERNEL) || !defined(_STRICT_STDC) || \\
I imagine that that's what's preventing this from working in c99 mode, and I'm not sure the correct way to deal with this.