kselftest/arm64: Add missing stddef.h include to BTI tests
PATCH 1/1 kselftest/arm64: Add missing stddef.h include to BTI tests
Explicitly include stddef.h when building the BTI tests so that we have a definition of NULL, with at least some toolchains this is not done implicitly by anything else:
test.c: In function ‘start’:
test.c:214:25: error: ‘NULL’ undeclared (first use in this function)
214 | sigaction(SIGILL, &sa, NULL);
| ^~~~
test.c:20:1: note: ‘NULL’ is defined in header ‘<stddef.h>’; did you forget to ‘#include <stddef.h>’?
--- tools/testing/selftests/arm64/bti/test.c | 1 + 1 file changed, 1 insertion(+)
tools/testing/selftests/arm64/bti/test.c +1 -0
@@ -6,6 +6,7 @@#include "system.h" +#include <stddef.h> #include <linux/errno.h> #include <linux/auxvec.h> #include <linux/signal.h>
Signature · 1 line
2.20.1
Quoted 9 lines · Mark Brown
Explicitly include
stddef.hwhen building the BTI tests so that we have a definition of NULL, with at least some toolchains this is not done implicitly by anything else:
test.c: In function ‘start’:
test.c:214:25: error: ‘NULL’ undeclared (first use in this function)
214 |sigaction(SIGILL, &sa, NULL);
| ^~~~
test.c:20:1: note: ‘NULL’ is defined in header ‘<stddef.h>’; did you forget to ‘#include <stddef.h>’?
Applied to arm64 (for-next/fixes), thanks!
[1/1] kselftest/arm64: Add missing stddef.h include to BTI tests
https://git.kernel.org/arm64/c/a1bed090fc56
Signature · 7 lines
Catalin _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel