diff mbox series

[3/6] Use <poll.h> header instead of <sys/poll.h>

Message ID 736b1f0b3f59286150bf6b1eddcc0789c97bd9a9.1566976047.git.ps@pks.im (mailing list archive)
State New, archived
Headers show
Series Fixes for various compiler warnings | expand

Commit Message

Patrick Steinhardt Aug. 28, 2019, 7:10 a.m. UTC
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 <ps@pks.im>
---
 utils/gssd/svcgssd_main_loop.c | 2 +-
 utils/statd/sm-notify.c        | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

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>