summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2011-06-20 10:35:02 +0100
committerRichard W.M. Jones <rjones@redhat.com>2011-06-20 10:35:02 +0100
commit9287197a85a7b51167a3b6c289a129760e6f9936 (patch)
treee8f2a47bf593eb4bbcab2d3e635f274c853456ec
parentcabfaa857fbd325bd0303fa56b28df8ce52aab33 (diff)
downloadlibguestfs-9287197a85a7b51167a3b6c289a129760e6f9936.tar.gz
libguestfs-9287197a85a7b51167a3b6c289a129760e6f9936.tar.xz
libguestfs-9287197a85a7b51167a3b6c289a129760e6f9936.zip
Enable deprecated option only with gcc >= 4.5.
Before gcc 4.5, the deprecated option did not take the optional string argument (see [1]). This caused compilation to fail with gcc < 4.5. [1] http://gcc.gnu.org/gcc-4.5/changes.html
-rw-r--r--generator/generator_c.ml2
1 files changed, 1 insertions, 1 deletions
diff --git a/generator/generator_c.ml b/generator/generator_c.ml
index 771d6a29..82083060 100644
--- a/generator/generator_c.ml
+++ b/generator/generator_c.ml
@@ -373,7 +373,7 @@ extern \"C\" {
/* Define GUESTFS_WARN_DEPRECATED=1 to warn about deprecated API functions. */
#define GUESTFS_DEPRECATED_BY(s)
#if GUESTFS_WARN_DEPRECATED
-# if defined(__GNUC__) && GUESTFS_GCC_VERSION >= 30100 /* gcc >= 3.1.0 */
+# if defined(__GNUC__) && GUESTFS_GCC_VERSION >= 40500 /* gcc >= 4.5 */
# undef GUESTFS_DEPRECATED_BY
# define GUESTFS_DEPRECATED_BY(s) __attribute__((__deprecated__(\"change the program to use guestfs_\" s \" instead of this deprecated function\")))
# endif