diff options
author | Dunrong Huang <riegamaths@gmail.com> | 2013-09-07 03:59:05 +0800 |
---|---|---|
committer | Christophe Fergeau <cfergeau@redhat.com> | 2013-09-10 08:03:19 +0200 |
commit | 028159a09296f22c81f2be700da3a519f07e94ad (patch) | |
tree | ce36ffbc73ded280bbcaa0db4e5d3cce177fe38d | |
parent | 93165b36df98c174b8ced8e9feba3df6d968665d (diff) |
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 spice-audio.c:36:0:
../config.h:12:0: error: "_FORTIFY_SOURCE" redefined [-Werror]
spice-audio.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>
-rw-r--r-- | m4/spice-compile-warnings.m4 | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/m4/spice-compile-warnings.m4 b/m4/spice-compile-warnings.m4 index 31fc0fc..533bac6 100644 --- a/m4/spice-compile-warnings.m4 +++ b/m4/spice-compile-warnings.m4 @@ -104,7 +104,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 defined __OPTIMIZE__ && __OPTIMIZE__ + #if !defined _FORTIFY_SOURCE && defined __OPTIMIZE__ && __OPTIMIZE__ # define _FORTIFY_SOURCE 2 #endif ]) |