diff options
author | 2025-04-30 11:35:33 +0200 | |
---|---|---|
committer | 2025-05-21 15:32:00 +0200 | |
commit | 1f421ddf494d3263842bcf430a683aaf33c3e31c (patch) | |
tree | 1e677ce42483eb2b9436f2e33be1f957181524ea /tools | |
parent | tools/nolibc: move poll() to poll.h (diff) | |
download | wireguard-linux-1f421ddf494d3263842bcf430a683aaf33c3e31c.tar.xz wireguard-linux-1f421ddf494d3263842bcf430a683aaf33c3e31c.zip |
tools/nolibc: use poll-related definitions from UAPI headers
The UAPI headers already provide definitions for these symbols.
Using them makes the code shorter, more robust and compatible with
applications using linux/poll.h directly.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Acked-by: Willy Tarreau <w@1wt.eu>
Link: https://lore.kernel.org/r/20250430-poll-v1-2-44b5ceabdeee@linutronix.de
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/include/nolibc/poll.h | 2 | ||||
-rw-r--r-- | tools/include/nolibc/types.h | 14 |
2 files changed, 1 insertions, 15 deletions
diff --git a/tools/include/nolibc/poll.h b/tools/include/nolibc/poll.h index be6e44fe022d..1765acb17ea0 100644 --- a/tools/include/nolibc/poll.h +++ b/tools/include/nolibc/poll.h @@ -11,9 +11,9 @@ #define _NOLIBC_POLL_H #include "arch.h" -#include "types.h" #include "sys.h" +#include <linux/poll.h> #include <linux/time.h> /* diff --git a/tools/include/nolibc/types.h b/tools/include/nolibc/types.h index fe97953d1657..70f20519ebf9 100644 --- a/tools/include/nolibc/types.h +++ b/tools/include/nolibc/types.h @@ -159,20 +159,6 @@ typedef struct { __set->fds[__idx] = 0; \ } while (0) -/* for poll() */ -#define POLLIN 0x0001 -#define POLLPRI 0x0002 -#define POLLOUT 0x0004 -#define POLLERR 0x0008 -#define POLLHUP 0x0010 -#define POLLNVAL 0x0020 - -struct pollfd { - int fd; - short int events; - short int revents; -}; - /* for getdents64() */ struct linux_dirent64 { uint64_t d_ino; |