libnm-glib: fix to not depend on newer glib

This commit is contained in:
Dan Winship 2012-02-06 15:11:43 -05:00 committed by Dan Williams
parent 95b0b72211
commit 410ac72325
5 changed files with 15 additions and 1 deletions

View file

@ -1,3 +1,4 @@
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
/* NetworkManager -- Network link manager
*
* Dan Williams <dcbw@redhat.com>
@ -29,4 +30,13 @@
#define g_value_get_schar g_value_get_char
#endif
#if !GLIB_CHECK_VERSION(2,28,0)
#define g_simple_async_result_take_error(result, error) \
G_STMT_START { \
GError *__error = error; \
g_simple_async_result_set_from_error (result, __error); \
g_error_free (__error); \
} G_STMT_END
#endif
#endif /* NM_GLIB_COMPAT_H */

View file

@ -36,6 +36,7 @@
#include "nm-vpn-connection.h"
#include "nm-object-cache.h"
#include "nm-dbus-glib-types.h"
#include "nm-glib-compat.h"
void _nm_device_wifi_set_wireless_enabled (NMDeviceWifi *device, gboolean enabled);

View file

@ -602,7 +602,8 @@ object_created (GObject *obj, gpointer user_data)
} else {
GObject **obj_p = pi->field;
g_clear_object (obj_p);
if (*obj_p)
g_object_unref (*obj_p);
*obj_p = odata->objects[0];
}

View file

@ -30,6 +30,7 @@
#include "nm-remote-connection.h"
#include "nm-remote-connection-private.h"
#include "nm-dbus-glib-types.h"
#include "nm-glib-compat.h"
#define NM_REMOTE_CONNECTION_BUS "bus"

View file

@ -29,6 +29,7 @@
#include "nm-dbus-glib-types.h"
#include "nm-remote-settings.h"
#include "nm-remote-connection-private.h"
#include "nm-glib-compat.h"
static void nm_remote_settings_initable_iface_init (GInitableIface *iface);
static void nm_remote_settings_async_initable_iface_init (GAsyncInitableIface *iface);