Skip to contentSkip to conversation

Remove wrong poll.h include

PATCH In review Rosen Penev 2 participants 2 messages Apr 3, 2019 – Apr 11, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Remove wrong poll.h include

musl reports:

warning redirecting incorrect #include <sys/poll.h> to <poll.h>

---
 configure.ac          | 2 +-
 src/openvpn/syshead.h | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
configure.ac +1 -1
index 891799ea..37880d29 100644
@@ -436,7 +436,7 @@ AC_CHECK_HEADERS([ \
 	unistd.h signal.h libgen.h stropts.h \
 	syslog.h pwd.h grp.h \
 	sys/sockio.h sys/uio.h linux/sockios.h \
-	linux/types.h sys/poll.h sys/epoll.h err.h \
+	linux/types.h poll.h sys/epoll.h err.h \
 ])
 
 SOCKET_INCLUDES="
src/openvpn/syshead.h +2 -2
index d2a50341..2b4c49ff 100644
@@ -179,8 +179,8 @@
 #include <resolv.h>
 #endif
 
-#ifdef HAVE_SYS_POLL_H
-#include <sys/poll.h>
+#ifdef HAVE_POLL_H
+#include <poll.h>
 #endif
 
 #ifdef HAVE_SYS_EPOLL_H
Signature · 1 line
2.17.1
Acked-by on v1 1/1
#1 lore raw

"This is what the standard says" - and we checked everything that we currently support (back to FreeBSD 7.4, old Solaris, AIX) and all systems have a poll.h, which is either a symlink to sys/poll.h or just does "#include <sys/poll.h>". So it's fairly much a no-op today, but might prevent compile-time issues on more standards-enforcing future systems... (very theoretical, this)

Your patch has been applied to the master branch.

commit 6206316275b14bd433a8651568f0185f4fa9f038

Author: Rosen Penev
Date:   Wed Apr 3 15:57:40 2019 -0700
     Remove wrong poll.h include

     Signed-off-by: Rosen Penev <[email protected]...>
     Acked-by: Gert Doering <[email protected]...>
     Message-Id: <[email protected]...>
     URL: https://www.mail-archive.com/[email protected]/msg18336.html
     Signed-off-by: Gert Doering <[email protected]...>

--
kind regards,

Gert Doering