Re: [PATCH 3/4] tools/nolibc: move FD_* definitions to sys/select.h
From: Thomas Weißschuh
Date: Sat Jun 21 2025 - 04:22:20 EST
On 2025-06-20 12:02:50+0200, Willy Tarreau wrote:
> Modern programs tend to include sys/select.h to get FD_SET() and
> FD_CLR() definitions as well as struct fd_set, but in our case it
> didn't exist. Let's move these definitions from types.h to sys/select.h
> to help port existing programs.
>
> Signed-off-by: Willy Tarreau <w@xxxxxx>
<snip>
> diff --git a/tools/include/nolibc/types.h b/tools/include/nolibc/types.h
> index 16c6e9ec9451f..0b51ede4e0a9c 100644
> --- a/tools/include/nolibc/types.h
> +++ b/tools/include/nolibc/types.h
> @@ -10,6 +10,7 @@
> #ifndef _NOLIBC_TYPES_H
> #define _NOLIBC_TYPES_H
>
> +#include "sys/select.h"
Is this really necessary?
> #include "std.h"
> #include <linux/mman.h>
> #include <linux/stat.h>
> @@ -70,11 +71,6 @@
> #define DT_LNK 0xa
> #define DT_SOCK 0xc
<snip>