From 2ba3cfa1607c36613f3b30fb1ae4ec530245ce64 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Fri, 10 Jun 2016 10:46:05 +0200 Subject: malloc: Remove __malloc_initialize_hook from the API [BZ #19564] __malloc_initialize_hook is interposed by application code, so the usual approach to define a compatibility symbol does not work. This commit adds a new mechanism based on #pragma GCC poison in . --- include/stdc-predef.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include/stdc-predef.h') diff --git a/include/stdc-predef.h b/include/stdc-predef.h index f9f7f731d1..52cf8d10a0 100644 --- a/include/stdc-predef.h +++ b/include/stdc-predef.h @@ -57,4 +57,11 @@ /* We do not support C11 . */ #define __STDC_NO_THREADS__ 1 +/* Remove symbols from the API which can be interposed. */ +#if defined (__GNUC__) +# if __GNUC__ >= 4 +# pragma GCC poison __malloc_initialize_hook +# endif /* __GNUC__ >= 4 */ +#endif /* __GNUC__ */ + #endif -- cgit 1.4.1