[vlc-devel] [PATCH 1/1] build: define _FORTIFY_SOURCE only if it is not already defined
Janne Grunau
janne-vlc at jannau.net
Sat Aug 13 18:48:47 CEST 2016
Fixes "_FORTIFY_SOURCE redefined" warnings in every file which includes
config.h if _FORTIFY_SOURCE is predefined by the toolchain.
---
configure.ac | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index 09b3a33..8f055c1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -46,7 +46,8 @@ dnl
AC_PROG_CC_C99
AC_USE_SYSTEM_EXTENSIONS
VLC_PROG_CC_C11
-AC_DEFINE([_FORTIFY_SOURCE], 2, [Define to 2 to get glibc warnings.])
+AC_CHECK_DECL(_FORTIFY_SOURCE, ,
+ AC_DEFINE([_FORTIFY_SOURCE], 2, [Define to 2 to get glibc warnings]),)
AC_DEFINE([_FILE_OFFSET_BITS], 64, [Define to 64 for large files support.])
AH_TOP([
#ifndef _REENTRANT
--
2.9.2
More information about the vlc-devel
mailing list