mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-10 05:17:59 +03:00
build: improve FORTIFY_SOURCE usage
Based on this coreutils bug report, since coreutils copied what libvirt had done: https://lists.gnu.org/archive/html/bug-coreutils/2012-10/msg00121.html * m4/virt-compile-warnings.m4 (LIBVIRT_COMPILE_WARNINGS): Allow for user to pre-define _FORTIFY_SOURCE.
This commit is contained in:
parent
2f3e2c0c43
commit
cf9bced084
@ -150,7 +150,7 @@ AC_DEFUN([LIBVIRT_COMPILE_WARNINGS],[
|
||||
AH_VERBATIM([FORTIFY_SOURCE],
|
||||
[/* Enable compile-time and run-time bounds-checking, and some warnings,
|
||||
without upsetting newer glibc. */
|
||||
#if defined __OPTIMIZE__ && __OPTIMIZE__
|
||||
#if !defined _FORTIFY_SOURCE && defined __OPTIMIZE__ && __OPTIMIZE__
|
||||
# define _FORTIFY_SOURCE 2
|
||||
#endif
|
||||
])
|
||||
|
Loading…
Reference in New Issue
Block a user