[mutter] Don't re-define auto cleanup symbols
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] Don't re-define auto cleanup symbols
- Date: Tue, 3 May 2016 07:08:47 +0000 (UTC)
commit aeda556af1fa8abfac0d0856f6bc03f86ab69409
Author: Emmanuele Bassi <ebassi gnome org>
Date: Tue May 3 07:54:42 2016 +0100
Don't re-define auto cleanup symbols
Starting from GLib 2.49, the gdbus-codegen tool automatically generates
the auto cleanup symbols for the GDBus proxy and skeleton interfaces.
Since we don't depend on a specific version of GLib we need to
conditionally generate the auto cleanup symbols in case an older version
of gdbus-codegen is used when building Mutter.
This commit unbreaks the build under GNOME Continuous, which has been
failing with:
usr/include/glib-2.0/glib/gmacros.h:415:43: error: redefinition of 'glib_autoptr_cleanup_Login1Session'
#define _GLIB_AUTOPTR_FUNC_NAME(TypeName) glib_autoptr_cleanup_##TypeName
^
[...]
/usr/include/glib-2.0/glib/gmacros.h:415:43: note: previous definition of
'glib_autoptr_cleanup_Login1Session' was here
./meta-dbus-login1.h:82:1: note: in expansion of macro 'G_DEFINE_AUTOPTR_CLEANUP_FUNC'
G_DEFINE_AUTOPTR_CLEANUP_FUNC (Login1Session, g_object_unref)
^
src/backends/native/meta-launcher.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/src/backends/native/meta-launcher.c b/src/backends/native/meta-launcher.c
index 824f918..2a7b279 100644
--- a/src/backends/native/meta-launcher.c
+++ b/src/backends/native/meta-launcher.c
@@ -49,8 +49,13 @@
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GUdevDevice, g_object_unref)
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GUdevClient, g_object_unref)
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GUdevEnumerator, g_object_unref)
+
+#ifndef glib_autoptr_cleanup_Login1Session
G_DEFINE_AUTOPTR_CLEANUP_FUNC(Login1Session, g_object_unref)
+#endif
+#ifndef glib_autoptr_cleanup_Login1Seat
G_DEFINE_AUTOPTR_CLEANUP_FUNC(Login1Seat, g_object_unref)
+#endif
struct _MetaLauncher
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]