This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Use <sys/poll.h> if available before going select().
authorJarkko Hietaniemi <jhi@iki.fi>
Mon, 17 Aug 2015 00:15:11 +0000 (20:15 -0400)
committerJarkko Hietaniemi <jhi@iki.fi>
Fri, 2 Oct 2015 22:35:01 +0000 (18:35 -0400)
Some BSD implementations might have <sys/poll.h> instead of <poll.h>.

Noticed while looking for unused symbols.

dist/IO/poll.h

index 634bcdd..08de250 100644 (file)
@@ -12,6 +12,8 @@
 
 #if (defined(HAS_POLL) && defined(I_POLL)) || defined(POLLWRBAND)
 #  include <poll.h>
+#elif (defined(HAS_POLL) && defined(I_SYS_POLL))
+#  include <sys/poll.h>
 #else
 #ifdef HAS_SELECT