[libc] Also remove _FORTIFY_SOURCE before including <stdlib.h> in overlay mode. (#142647)
This commit is contained in:
@@ -19,6 +19,11 @@
|
||||
// functions, causing external alias errors. They are guarded by
|
||||
// `__USE_FORTIFY_LEVEL`, which will be temporarily disabled.
|
||||
|
||||
#ifdef _FORTIFY_SOURCE
|
||||
#define LIBC_OLD_FORTIFY_SOURCE _FORTIFY_SOURCE
|
||||
#undef _FORTIFY_SOURCE
|
||||
#endif
|
||||
|
||||
#ifdef __USE_FORTIFY_LEVEL
|
||||
#define LIBC_OLD_USE_FORTIFY_LEVEL __USE_FORTIFY_LEVEL
|
||||
#undef __USE_FORTIFY_LEVEL
|
||||
@@ -27,6 +32,11 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifdef LIBC_OLD_FORTIFY_SOURCE
|
||||
#define _FORTIFY_SOURCE LIBC_OLD_FORTIFY_SOURCE
|
||||
#undef LIBC_OLD_FORTIFY_SOURCE
|
||||
#endif
|
||||
|
||||
#ifdef LIBC_OLD_USE_FORTIFY_LEVEL
|
||||
#undef __USE_FORTIFY_LEVEL
|
||||
#define __USE_FORTIFY_LEVEL LIBC_OLD_USE_FORTIFY_LEVEL
|
||||
|
||||
Reference in New Issue
Block a user