summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Blake <eblake@redhat.com>2012-07-31 13:14:28 +0100
committerRichard W.M. Jones <rjones@redhat.com>2012-07-31 13:15:34 +0100
commit06780a92b3e4ea14c09a169cc1d22c1371621fc3 (patch)
tree1ffb058e4d6ff635fef55ce8ab7540c7502ed2fb
parent499497fab03716278cb5214a8aa89a35618e06c6 (diff)
downloadlibguestfs-06780a92b3e4ea14c09a169cc1d22c1371621fc3.tar.gz
libguestfs-06780a92b3e4ea14c09a169cc1d22c1371621fc3.tar.xz
libguestfs-06780a92b3e4ea14c09a169cc1d22c1371621fc3.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
-rw-r--r--configure.ac7
1 files changed, 5 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index 7f99fe62..60f6ad85 100644
--- a/configure.ac
+++ b/configure.ac
@@ -158,9 +158,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