Use <poll.h> insted of <sys/poll.h>

Acording to POSIX <poll.h> should be used instead of <sys/poll.h>.

Libcs like musl libc added a redict due maintain compat with older
glibcs and added the following warning:

	/usr/include/sys/poll.h:1:2: warning: #warning redirecting incorrect #include <sys/poll.h> to <poll.h> [-Wcpp]
	    1 | #warning redirecting incorrect #include <sys/poll.h> to <poll.h>
	      |  ^~~~~~~

Ref: https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/poll.h.html
This commit is contained in:
fossdd
2025-03-02 23:39:08 +01:00
committed by Nico Williams
parent bbfc116686
commit d233bf84d7
3 changed files with 3 additions and 3 deletions

View File

@@ -41,7 +41,7 @@
#include <sys/un.h>
#endif
#include <sys/poll.h>
#include <poll.h>
#include <ctype.h>
#include <stdio.h>

View File

@@ -44,7 +44,7 @@
#include <ctype.h>
#ifdef HAVE_POLL_H
#include <sys/poll.h>
#include <poll.h>
#endif
#include <krb5-types.h>

View File

@@ -125,7 +125,7 @@ rk_freeifaddrs(struct ifaddrs *ifp);
#include <linux/rtnetlink.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/poll.h>
#include <poll.h>
#include <netpacket/packet.h>
#include <net/ethernet.h> /* the L2 protocols */
#include <sys/uio.h>