2019-08-28 07:11:49

by Patrick Steinhardt

[permalink] [raw]
Subject: [PATCH 3/6] Use <poll.h> header instead of <sys/poll.h>

The POSIX standard specifies that poll(3P) should be declared in the
header <poll.h> instead of <sys/poll.h>. While there is one location
where we use the correct header, two others do not, causing warnings on
musl libc systems.

Fix the warning by switching from <sys/poll.h> to <poll.h>. As we're
already using the latter one already, this change should not cause any
problems for other platforms.

Signed-off-by: Patrick Steinhardt <[email protected]>
---
utils/gssd/svcgssd_main_loop.c | 2 +-
utils/statd/sm-notify.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/utils/gssd/svcgssd_main_loop.c b/utils/gssd/svcgssd_main_loop.c
index b5681ce1..920520d0 100644
--- a/utils/gssd/svcgssd_main_loop.c
+++ b/utils/gssd/svcgssd_main_loop.c
@@ -34,7 +34,7 @@

#include <sys/param.h>
#include <sys/socket.h>
-#include <sys/poll.h>
+#include <poll.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <netinet/in.h>
diff --git a/utils/statd/sm-notify.c b/utils/statd/sm-notify.c
index abfb8bc7..739731f5 100644
--- a/utils/statd/sm-notify.c
+++ b/utils/statd/sm-notify.c
@@ -12,7 +12,7 @@
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/stat.h>
-#include <sys/poll.h>
+#include <poll.h>
#include <sys/param.h>
#include <sys/syslog.h>
#include <arpa/inet.h>
--
2.23.0