tools/nolibc: Use linux/wait.h rather than duplicating it
authorMark Brown <broonie@kernel.org>
Mon, 23 Oct 2023 18:42:45 +0000 (19:42 +0100)
committerThomas Weißschuh <linux@weissschuh.net>
Mon, 11 Dec 2023 21:38:08 +0000 (22:38 +0100)
Linux defines a few custom flags for waitpid() which aren't currently
provided by nolibc, make them available to nolibc based programs by just
including linux/wait.h where they are defined instead of defining our
own copy of the flags.

Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Willy Tarreau <w@1wt.eu>
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
tools/include/nolibc/types.h

index 8cfc4c860fa4443b3a025304f0aafd24d423491c..ad0ddaa89e5054877e73f602c1179e9998663a47 100644 (file)
@@ -12,6 +12,7 @@
 #include <linux/reboot.h> /* for LINUX_REBOOT_* */
 #include <linux/stat.h>
 #include <linux/time.h>
+#include <linux/wait.h>
 
 
 /* Only the generic macros and types may be defined here. The arch-specific
 #define WTERMSIG(status)    ((status) & 0x7f)
 #define WIFSIGNALED(status) ((status) - 1 < 0xff)
 
-/* waitpid() flags */
-#define WNOHANG      1
-
 /* standard exit() codes */
 #define EXIT_SUCCESS 0
 #define EXIT_FAILURE 1