summaryrefslogtreecommitdiffstats
path: root/m4
diff options
context:
space:
mode:
authorDunrong Huang <riegamaths@gmail.com>2013-09-07 03:57:59 +0800
committerChristophe Fergeau <cfergeau@redhat.com>2013-09-10 07:59:54 +0200
commit6f4d2c8afbde16fdaf06cb3b3701041c8edbb35a (patch)
tree669f0d5ba37626a7f37197e4cf6fb1134f5cc5e0 /m4
parent79896440928600bfa45cdc86e088e1196482511a (diff)
downloadspice-6f4d2c8afbde16fdaf06cb3b3701041c8edbb35a.tar.gz
spice-6f4d2c8afbde16fdaf06cb3b3701041c8edbb35a.tar.xz
spice-6f4d2c8afbde16fdaf06cb3b3701041c8edbb35a.zip
Fix _FORTIFY_SOURCE redefine error
If the _FORTIFY_SOURCE has been already defined, we shouldn't redefine it, or it will raise a build error as below: In file included from agent-msg-filter.c:21:0: ../config.h:17:0: error: "_FORTIFY_SOURCE" redefined [-Werror] agent-msg-filter.c:1:0: note: this is the location of the previous definition Suggested-by: Christophe Fergeau <cfergeau@redhat.com> Signed-off-by: Dunrong Huang <riegamaths@gmail.com>
Diffstat (limited to 'm4')
-rw-r--r--m4/spice-compile-warnings.m42
1 files changed, 1 insertions, 1 deletions
diff --git a/m4/spice-compile-warnings.m4 b/m4/spice-compile-warnings.m4
index 959971a2..31f2a9c3 100644
--- a/m4/spice-compile-warnings.m4
+++ b/m4/spice-compile-warnings.m4
@@ -113,7 +113,7 @@ AC_DEFUN([SPICE_COMPILE_WARNINGS],[
# Use improved glibc headers
AH_VERBATIM([FORTIFY_SOURCE],
[/* Enable compile-time and run-time bounds-checking, and some warnings. */
-#if __OPTIMIZE__
+#if !defined _FORTIFY_SOURCE && defined __OPTIMIZE__ && __OPTIMIZE__
# define _FORTIFY_SOURCE 2
#endif
])