From bfb2d780ff11cb547cc20d31c473be35cacb4509 Mon Sep 17 00:00:00 2001 From: John Ralls Date: Tue, 8 Oct 2013 11:33:11 -0700 Subject: [PATCH] Bug 70255 - Build fails with glib-2.38 --- configure.ac | 3 +++ test-tree-magic.c | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 68007c9..60a4c4d 100644 --- a/configure.ac +++ b/configure.ac @@ -29,6 +29,9 @@ dnl Check whether libxml and glib are present is installed PKG_CHECK_MODULES(ALL, \ libxml-2.0 >= 2.4 \ glib-2.0 >= 2.6.0) +PKG_CHECK_MODULES(GLIB_2_36, glib-2.0 >= 2.36.0, + [AC_DEFINE([HAVE_GLIB_2_36], [1], [Configure g_type_init deprecation])], + [PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.6.0)]) AC_SUBST(ALL_CFLAGS) AC_SUBST(ALL_LIBS) diff --git a/test-tree-magic.c b/test-tree-magic.c index 9b4dfaf..ec44a29 100644 --- a/test-tree-magic.c +++ b/test-tree-magic.c @@ -637,8 +637,9 @@ int main (int argc, char **argv) char *content, **lines; guint i; +#ifndef HAVE_GLIB_2_36 g_type_init (); - +#endif if (argc != 2) { g_print ("Usage: %s [file]\n", argv[0]); g_print ("Where file contains, on each line, a directory path,\n" -- 1.8.3.rc0