]> granicus.if.org Git - curl/commitdiff
poll: prefer <poll.h> over <sys/poll.h>
authorMarcel Raad <raad@teamviewer.com>
Mon, 10 Apr 2017 19:59:42 +0000 (21:59 +0200)
committerMarcel Raad <raad@teamviewer.com>
Tue, 11 Apr 2017 06:31:38 +0000 (08:31 +0200)
The POSIX standard location is <poll.h>. Using <sys/poll.h> results in
warning spam when using the musl standard library.

Closes https://github.com/curl/curl/pull/1406

lib/select.h
src/tool_sleep.c

index e247bd9d05129496167b42d5010b09abbf3d3dc3..4ed5dd2f8df8082797a77a98596454eca58feb27 100644 (file)
 
 #include "curl_setup.h"
 
-#ifdef HAVE_SYS_POLL_H
-#include <sys/poll.h>
-#elif defined(HAVE_POLL_H)
+#ifdef HAVE_POLL_H
 #include <poll.h>
+#elif defined(HAVE_SYS_POLL_H)
+#include <sys/poll.h>
 #endif
 
 /*
index d878512ac4daf76e337764bb2b0840520669e725..e19db5a779c4dd33100b972b46917f5c9a113c8d 100644 (file)
 #  include <sys/select.h>
 #endif
 
-#ifdef HAVE_SYS_POLL_H
-#  include <sys/poll.h>
-#elif defined(HAVE_POLL_H)
+#ifdef HAVE_POLL_H
 #  include <poll.h>
+#elif defined(HAVE_SYS_POLL_H)
+#  include <sys/poll.h>
 #endif
 
 #ifdef MSDOS