diff options
author | Eric Blake <eblake@redhat.com> | 2012-07-31 13:14:28 +0100 |
---|---|---|
committer | Richard W.M. Jones <rjones@redhat.com> | 2012-08-05 22:48:53 +0100 |
commit | 737ff070f22cb02dd59453f99eb85ff2caa30ec2 (patch) | |
tree | 25cb10907e598b9f485ccdcfcf686169b04ffc34 | |
parent | d9f2af3c1cbf2230c547dcf4fd649f77734e0814 (diff) | |
download | libguestfs-737ff070f22cb02dd59453f99eb85ff2caa30ec2.tar.gz libguestfs-737ff070f22cb02dd59453f99eb85ff2caa30ec2.tar.xz libguestfs-737ff070f22cb02dd59453f99eb85ff2caa30ec2.zip |
build: Allow building with new glibc headers and -O0.
This is a patch taken from libvirt. See:
http://libvirt.org/git/?p=libvirt.git;a=commitdiff;h=2af63b1c349
(cherry picked from commit 06780a92b3e4ea14c09a169cc1d22c1371621fc3)
-rw-r--r-- | configure.ac | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac index 16dd7c29..6d31b966 100644 --- a/configure.ac +++ b/configure.ac @@ -156,9 +156,12 @@ if test "$gl_gcc_warnings" = yes; then AC_SUBST([WARN_CFLAGS]) AC_DEFINE([lint], [1], [Define to 1 if the compiler is checking for lint.]) - AC_DEFINE([_FORTIFY_SOURCE], [2], - [enable compile-time and run-time bounds-checking, and some warnings]) AC_DEFINE([GNULIB_PORTCHECK], [1], [enable some gnulib portability checks]) + AH_VERBATIM([FORTIFY_SOURCE], + [/* Enable compile-time and run-time bounds-checking, and some warnings. */ +#if __OPTIMIZE__ +# define _FORTIFY_SOURCE 2 +#endif]) fi AC_C_PROTOTYPES |