[NetworkManager/f13/master] More fixes for older glib

Daniel Williams dcbw at fedoraproject.org
Thu Mar 3 09:34:40 UTC 2011


commit 644960f0b51a869883c6b1a7a2f80ed43ec6716f
Author: Dan Williams <dcbw at redhat.com>
Date:   Thu Mar 3 01:34:12 2011 -0600

    More fixes for older glib

 fix-glib-compat.patch |   38 ++++++++++++++++++++++++++++++++++++++
 1 files changed, 38 insertions(+), 0 deletions(-)
---
diff --git a/fix-glib-compat.patch b/fix-glib-compat.patch
index cd15cb5..f9f3ac0 100644
--- a/fix-glib-compat.patch
+++ b/fix-glib-compat.patch
@@ -41,3 +41,41 @@ index 49b903e..75ac987 100644
 -- 
 1.7.4
 
+From aee725fe9f9fc956bd5a75a37ef1c7f2ca168702 Mon Sep 17 00:00:00 2001
+From: Dan Williams <dcbw at redhat.com>
+Date: Thu, 3 Mar 2011 01:32:26 -0600
+Subject: [PATCH] core: fix some code that required glib 2.26
+
+Stable branch must be compatible with glib 2.18 or later.  Thus
+we can't use g_key_file_set_uint64().
+---
+ src/nm-manager.c |    6 ++++--
+ 1 files changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/src/nm-manager.c b/src/nm-manager.c
+index 8cb28c6..8b24aa5 100644
+--- a/src/nm-manager.c
++++ b/src/nm-manager.c
+@@ -474,7 +474,7 @@ update_active_connection_timestamp (NMManager *manager, NMDevice *device)
+ 	guint64 timestamp;
+ 	guint64 *ts_ptr;
+ 	GKeyFile *timestamps_file;
+-	char *data;
++	char *data, *tmp;
+ 	gsize len;
+ 	GError *error = NULL;
+ 
+@@ -509,7 +509,9 @@ update_active_connection_timestamp (NMManager *manager, NMDevice *device)
+ 		g_clear_error (&error);
+ 	}
+ 
+-	g_key_file_set_uint64 (timestamps_file, "timestamps", connection_uuid, timestamp);
++	tmp = g_strdup_printf ("%" G_GUINT64_FORMAT, timestamp);
++	g_key_file_set_value (timestamps_file, "timestamps", connection_uuid, tmp);
++	g_free (tmp);
+ 
+ 	data = g_key_file_to_data (timestamps_file, &len, &error);
+ 	if (data) {
+-- 
+1.7.4
+


More information about the scm-commits mailing list