tools/nolibc: fix spelling of FD_SETBITMASK in FD_* macros
Subsystems (2)
Willy Tarreau
maintainerPATCH 1/1 tools/nolibc: fix spelling of FD_SETBITMASK in FD_* macros
While nolibc-test does test syscalls, it doesn't test as much the rest of the macros, and a wrong spelling of FD_SETBITMASK in commit feaf75658783a broke programs using either FD_SET() or FD_CLR() without being noticed. Let's fix these macros.
--- tools/include/nolibc/types.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
tools/include/nolibc/types.h +2 -2
@@ -128,7 +128,7 @@ typedef struct {int __fd = (fd); \if (__fd >=0 ) \ __set->fds[__fd /FD_SETIDXMASK ] &= \ - ~(1U << (__fd &FX_SETBITMASK )); \ + ~(1U << (__fd &FD_SETBITMASK )); \ } while (0)#define FD_SET (fd, set) do { \
@@ -145,7 +145,7 @@ typedef struct {int __r =0 ; \if (__fd >=0 ) \ __r = !!(__set->fds[__fd /FD_SETIDXMASK ] & \ -1U << (__fd &FD_SET_BITMASK )); \ +1U << (__fd &FD_SETBITMASK )); \ __r; \ })
Signature · 1 line
2.17.5
Quoted 8 lines · Willy Tarreau
While nolibc-test does test syscalls, it doesn't test as much the rest of the macros, and a wrong spelling of
FD_SETBITMASKin commitfeaf75658783abroke programs using eitherFD_SET()orFD_CLR()without being noticed. Let's fix these macros.Fixes feaf75658783a ("nolibc: fix fd_set type")Cc [email protected] # v6.2+Signed-off-by Willy Tarreau <[email protected]>
Let me know if I should apply it.
Willy Tarreau
maintainerQuoted 6 lines · Thomas Weißschuh
Quoted 5 lines · Willy Tarreau
While nolibc-test does test syscalls, it doesn't test as much the rest of the macros, and a wrong spelling of
FD_SETBITMASKin commitfeaf75658783abroke programs using eitherFD_SET()orFD_CLR()without being noticed. Let's fix these macros.
Quoted 7 lines
Quoted 3 lines
Fixes feaf75658783a ("nolibc: fix fd_set type")Cc [email protected] # v6.2+Signed-off-by Willy Tarreau <[email protected]>Acked-by Thomas Weißschuh <[email protected]>Let me know if I should apply it.
As you prefer, given that you already have other ones in flight, maybe you want to order them as desired. Otherwise I'll push it.
Thanks!
Willy
Thomas Weißschuh
maintainerQuoted 11 lines · Willy Tarreau
Quoted 10 lines · Thomas Weißschuh
Quoted 8 lines · Willy Tarreau
While nolibc-test does test syscalls, it doesn't test as much the rest of the macros, and a wrong spelling of
FD_SETBITMASKin commitfeaf75658783abroke programs using eitherFD_SET()orFD_CLR()without being noticed. Let's fix these macros.Fixes feaf75658783a ("nolibc: fix fd_set type")Cc [email protected] # v6.2+Signed-off-by Willy Tarreau <[email protected]>
Quoted 6 lines
Quoted 3 lines
Acked-by Thomas Weißschuh <[email protected]>Let me know if I should apply it.
As you prefer, given that you already have other ones in flight, maybe you want to order them as desired. Otherwise I'll push it.
Then feel free to push it.
I have nothing going on right now.
Thomas