From b587e7d45c7aed0d1b1ab97d9c7d451df4837aa1 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Mon, 23 Dec 2024 03:58:54 +0800 Subject: Fix build without stack protector [BZ #32494] Without stack protector, inhibit_stack_protector is undefined during build: In file included from : ./../include/libc-symbols.h:665:3: error: expected ';' before '__typeof' 665 | __typeof (type_name) *name##_ifunc (__VA_ARGS__) \ | ^~~~~~~~ ./../include/libc-symbols.h:676:3: note: in expansion of macro '__ifunc_resolver' 676 | __ifunc_resolver (type_name, name, expr, init, static, __VA_ARGS__) | ^~~~~~~~~~~~~~~~ ./../include/libc-symbols.h:703:3: note: in expansion of macro '__ifunc_args' 703 | __ifunc_args (type_name, name, expr, init, arg) | ^~~~~~~~~~~~ ./../include/libc-symbols.h:790:3: note: in expansion of macro '__ifunc' 790 | __ifunc (redirected_name, name, expr, void, INIT_ARCH) | ^~~~~~~ ../sysdeps/x86_64/multiarch/memchr.c:29:1: note: in expansion of macro 'libc_ifunc_redirected' 29 | libc_ifunc_redirected (__redirect_memchr, memchr, IFUNC_SELECTOR ()); | ^~~~~~~~~~~~~~~~~~~~~ 1. Fix a typo in include/libc-symbols.h to define inhibit_stack_protector for build. 2. Don't include in include/libc-symbols.h since it has been included in include/libc-misc.h. 3. Change #include "libc-misc.h" to #include in string/test-string.h. This fixes BZ #32494. Signed-off-by: H.J. Lu Reviewed-by: Sam James --- string/test-string.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'string') diff --git a/string/test-string.h b/string/test-string.h index 6375972ea8..3b885aff6b 100644 --- a/string/test-string.h +++ b/string/test-string.h @@ -40,7 +40,7 @@ extern impl_t __start_impls[], __stop_impls[]; #undef __USE_STRING_INLINES -#include "libc-misc.h" +#include #include #include #include -- cgit v1.2.3