Building a allyesconfig kernel fails because macros are being redefined

From: Jesper Juhl

Date: Sun Oct 12 2025 - 19:48:31 EST


My current git HEAD is at 3a8660878839faadb4f1a6dd72c3179c1df56787

If I do :
make mrproper
make allyesconfig
make -j 33
it eventually fails with :

...
INSTALL libsubcmd_headers
CALL scripts/checksyscalls.sh
CC [U] samples/vfs/test-statx
CC [U] samples/watch_queue/watch_test
In file included from samples/vfs/test-statx.c:23:
usr/include/linux/fcntl.h:160:9: error: ‘AT_RENAME_NOREPLACE’
redefined [-Werror]
160 | #define AT_RENAME_NOREPLACE 0x0001
| ^~~~~~~~~~~~~~~~~~~
In file included from samples/vfs/test-statx.c:13:
/usr/include/stdio.h:171:10: note: this is the location of the
previous definition
171 | # define AT_RENAME_NOREPLACE RENAME_NOREPLACE
| ^~~~~~~~~~~~~~~~~~~
usr/include/linux/fcntl.h:161:9: error: ‘AT_RENAME_EXCHANGE’ redefined [-Werror]
161 | #define AT_RENAME_EXCHANGE 0x0002
| ^~~~~~~~~~~~~~~~~~
/usr/include/stdio.h:173:10: note: this is the location of the
previous definition
173 | # define AT_RENAME_EXCHANGE RENAME_EXCHANGE
| ^~~~~~~~~~~~~~~~~~
usr/include/linux/fcntl.h:162:9: error: ‘AT_RENAME_WHITEOUT’ redefined [-Werror]
162 | #define AT_RENAME_WHITEOUT 0x0004
| ^~~~~~~~~~~~~~~~~~
/usr/include/stdio.h:175:10: note: this is the location of the
previous definition
175 | # define AT_RENAME_WHITEOUT RENAME_WHITEOUT
| ^~~~~~~~~~~~~~~~~~
In file included from usr/include/linux/watch_queue.h:6,
from samples/watch_queue/watch_test.c:19:
usr/include/linux/fcntl.h:160:9: error: ‘AT_RENAME_NOREPLACE’
redefined [-Werror]
160 | #define AT_RENAME_NOREPLACE 0x0001
| ^~~~~~~~~~~~~~~~~~~
In file included from samples/watch_queue/watch_test.c:11:
/usr/include/stdio.h:171:10: note: this is the location of the
previous definition
171 | # define AT_RENAME_NOREPLACE RENAME_NOREPLACE
| ^~~~~~~~~~~~~~~~~~~
usr/include/linux/fcntl.h:161:9: error: ‘AT_RENAME_EXCHANGE’ redefined [-Werror]
161 | #define AT_RENAME_EXCHANGE 0x0002
| ^~~~~~~~~~~~~~~~~~
/usr/include/stdio.h:173:10: note: this is the location of the
previous definition
173 | # define AT_RENAME_EXCHANGE RENAME_EXCHANGE
| ^~~~~~~~~~~~~~~~~~
usr/include/linux/fcntl.h:162:9: error: ‘AT_RENAME_WHITEOUT’ redefined [-Werror]
162 | #define AT_RENAME_WHITEOUT 0x0004
| ^~~~~~~~~~~~~~~~~~
/usr/include/stdio.h:175:10: note: this is the location of the
previous definition
175 | # define AT_RENAME_WHITEOUT RENAME_WHITEOUT
| ^~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[4]: *** [scripts/Makefile.userprogs:29:
samples/watch_queue/watch_test] Error 1
make[3]: *** [scripts/Makefile.build:556: samples/watch_queue] Error 2
make[3]: *** Waiting for unfinished jobs....
cc1: all warnings being treated as errors
make[4]: *** [scripts/Makefile.userprogs:29: samples/vfs/test-statx] Error 1
make[3]: *** [scripts/Makefile.build:556: samples/vfs] Error 2
make[2]: *** [scripts/Makefile.build:556: samples] Error 2
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [/home/jj/src/linux/Makefile:2010: .] Error 2
make: *** [Makefile:248: __sub-make] Error 2

I haven't looked into fixing it (yet), just wanted to let you all know :-)

Kind regards
Jesper Juhl