aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Raad <raad@teamviewer.com>2017-04-10 21:59:42 +0200
committerMarcel Raad <raad@teamviewer.com>2017-04-11 08:31:38 +0200
commitaa573c3c55cda72ec5ef677d87f6f46a53385f0c (patch)
treeb339f0968448e6315ad6885e92a8fd50ccdc101c
parent5ed16e6a7ac49ce0df35e31dd89ce85a1222da65 (diff)
poll: prefer <poll.h> over <sys/poll.h>
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
-rw-r--r--lib/select.h6
-rw-r--r--src/tool_sleep.c6
2 files changed, 6 insertions, 6 deletions
diff --git a/lib/select.h b/lib/select.h
index e247bd9d0..4ed5dd2f8 100644
--- a/lib/select.h
+++ b/lib/select.h
@@ -24,10 +24,10 @@
#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
/*
diff --git a/src/tool_sleep.c b/src/tool_sleep.c
index d878512ac..e19db5a77 100644
--- a/src/tool_sleep.c
+++ b/src/tool_sleep.c
@@ -25,10 +25,10 @@
# 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