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 +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 +