[network-manager-openvpn] build: minor updates



commit 88fdcffd86f1140550b7f31a82c8a4ff6af2163f
Author: Dan Winship <danw gnome org>
Date:   Mon Feb 18 18:07:14 2013 -0500

    build: minor updates
    
    Only call g_type_init() on older glibs.
    
    Add a missing #include (that presumably used to get accidentally
    pulled in by something else).
    
    Use -DGDK_VERSION_MIN_REQUIRED to avoid deprecation warnings on
    GtkTable.

 configure.ac                            |    2 ++
 properties/tests/test-import-export.c   |    2 ++
 src/nm-openvpn-service-openvpn-helper.c |    2 ++
 src/nm-openvpn-service.c                |    3 +++
 4 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 58cb2c6..d99153d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -93,6 +93,8 @@ if test x"$with_gnome" != xno; then
        AC_SUBST(GTK_CFLAGS)
        AC_SUBST(GTK_LIBS)
 
+       GTK_CFLAGS="$GTK_CFLAGS -DGDK_VERSION_MIN_REQUIRED=GDK_VERSION_3_0"
+
        PKG_CHECK_MODULES(GNOMEKEYRING, gnome-keyring-1)
        AC_SUBST(GNOMEKEYRING_CFLAGS)
        AC_SUBST(GNOMEKEYRING_LIBS)
diff --git a/properties/tests/test-import-export.c b/properties/tests/test-import-export.c
index 5f0c92e..3932ce7 100644
--- a/properties/tests/test-import-export.c
+++ b/properties/tests/test-import-export.c
@@ -955,7 +955,9 @@ int main (int argc, char **argv)
        if (argc != 3)
                FAIL ("args", "usage: %s <conf path> <tmp dir>", argv[0]);
 
+#if !GLIB_CHECK_VERSION (2, 35, 0)
        g_type_init ();
+#endif
 
        if (!nm_utils_init (&error))
                FAIL ("nm-utils-init", "failed to initialize libnm-util: %s", error->message);
diff --git a/src/nm-openvpn-service-openvpn-helper.c b/src/nm-openvpn-service-openvpn-helper.c
index 7a0abb3..ac3230f 100644
--- a/src/nm-openvpn-service-openvpn-helper.c
+++ b/src/nm-openvpn-service-openvpn-helper.c
@@ -375,7 +375,9 @@ main (int argc, char *argv[])
        gboolean tapdev = FALSE;
        char **iter;
 
+#if !GLIB_CHECK_VERSION (2, 35, 0)
        g_type_init ();
+#endif
 
        connection = dbus_g_bus_get (DBUS_BUS_SYSTEM, &err);
        if (!connection) {
diff --git a/src/nm-openvpn-service.c b/src/nm-openvpn-service.c
index 1aaeddd..cabb5a0 100644
--- a/src/nm-openvpn-service.c
+++ b/src/nm-openvpn-service.c
@@ -45,6 +45,7 @@
 #include <arpa/inet.h>
 #include <ctype.h>
 #include <errno.h>
+#include <locale.h>
 
 #include <NetworkManager.h>
 #include <NetworkManagerVPN.h>
@@ -1390,7 +1391,9 @@ main (int argc, char *argv[])
                {NULL}
        };
 
+#if !GLIB_CHECK_VERSION (2, 35, 0)
        g_type_init ();
+#endif
 
        /* locale will be set according to environment LC_* variables */
        setlocale (LC_ALL, "");


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]