From ca06b3e66f9099c8c7ccc22184ba9950a801a984 Mon Sep 17 00:00:00 2001 From: Alexander Larsson Date: Mon, 14 Dec 2015 22:01:21 +0100 Subject: [PATCH] lib: Fix build with older glib --- lib/test-lib.c | 4 ++++ lib/xdg-app-enum-types.c.template | 1 + lib/xdg-app-installation.c | 2 +- lib/xdg-app-installation.h | 2 +- lib/xdg-app-installed-ref.c | 2 +- lib/xdg-app-ref.c | 1 + lib/xdg-app-remote-ref.c | 1 + lib/xdg-app-remote.c | 2 +- lib/xdg-app-remote.h | 2 +- 9 files changed, 12 insertions(+), 5 deletions(-) diff --git a/lib/test-lib.c b/lib/test-lib.c index 1343aaaa..551bdeca 100644 --- a/lib/test-lib.c +++ b/lib/test-lib.c @@ -1,3 +1,7 @@ +#include "config.h" + +#include "libglnx/libglnx.h" + #include int diff --git a/lib/xdg-app-enum-types.c.template b/lib/xdg-app-enum-types.c.template index 1c831a43..c9e79c0b 100644 --- a/lib/xdg-app-enum-types.c.template +++ b/lib/xdg-app-enum-types.c.template @@ -1,5 +1,6 @@ /*** BEGIN file-header ***/ #include "config.h" +#include #include #include #include diff --git a/lib/xdg-app-installation.c b/lib/xdg-app-installation.c index 1c0134d7..5bc91e18 100644 --- a/lib/xdg-app-installation.c +++ b/lib/xdg-app-installation.c @@ -20,12 +20,12 @@ #include "config.h" +#include "xdg-app-utils.h" #include "xdg-app-installation.h" #include "xdg-app-installed-ref-private.h" #include "xdg-app-remote-private.h" #include "xdg-app-enum-types.h" #include "xdg-app-dir.h" -#include "xdg-app-utils.h" typedef struct _XdgAppInstallationPrivate XdgAppInstallationPrivate; diff --git a/lib/xdg-app-installation.h b/lib/xdg-app-installation.h index d35fecde..cd869dae 100644 --- a/lib/xdg-app-installation.h +++ b/lib/xdg-app-installation.h @@ -47,7 +47,7 @@ typedef struct { #if !GLIB_CHECK_VERSION(2, 43, 4) -G_DEFINE_AUTOPTR_CLEANUP_FUNC(XdgAppInstallation, g_object_uninstallation) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(XdgAppInstallation, g_object_unref) #endif XDG_APP_EXTERN XdgAppInstallation *xdg_app_installation_new_system (void); diff --git a/lib/xdg-app-installed-ref.c b/lib/xdg-app-installed-ref.c index 10d509ce..494ac954 100644 --- a/lib/xdg-app-installed-ref.c +++ b/lib/xdg-app-installed-ref.c @@ -22,9 +22,9 @@ #include +#include "xdg-app-utils.h" #include "xdg-app-installed-ref.h" #include "xdg-app-enum-types.h" -#include "xdg-app-utils.h" #include "xdg-app-run.h" #include "xdg-app-dir.h" diff --git a/lib/xdg-app-ref.c b/lib/xdg-app-ref.c index 77a71322..392d7f69 100644 --- a/lib/xdg-app-ref.c +++ b/lib/xdg-app-ref.c @@ -20,6 +20,7 @@ #include "config.h" +#include "xdg-app-utils.h" #include "xdg-app-ref.h" #include "xdg-app-enum-types.h" diff --git a/lib/xdg-app-remote-ref.c b/lib/xdg-app-remote-ref.c index ec313488..51d0ec69 100644 --- a/lib/xdg-app-remote-ref.c +++ b/lib/xdg-app-remote-ref.c @@ -22,6 +22,7 @@ #include +#include "xdg-app-utils.h" #include "xdg-app-remote-ref-private.h" #include "xdg-app-remote-ref.h" #include "xdg-app-enum-types.h" diff --git a/lib/xdg-app-remote.c b/lib/xdg-app-remote.c index 4bdbe081..6825c57a 100644 --- a/lib/xdg-app-remote.c +++ b/lib/xdg-app-remote.c @@ -20,10 +20,10 @@ #include "config.h" +#include "xdg-app-utils.h" #include "xdg-app-remote-private.h" #include "xdg-app-remote-ref-private.h" #include "xdg-app-enum-types.h" -#include "xdg-app-utils.h" #include diff --git a/lib/xdg-app-remote.h b/lib/xdg-app-remote.h index 3be177a7..aa56631b 100644 --- a/lib/xdg-app-remote.h +++ b/lib/xdg-app-remote.h @@ -45,7 +45,7 @@ typedef struct { } XdgAppRemoteClass; #if !GLIB_CHECK_VERSION(2, 43, 4) -G_DEFINE_AUTOPTR_CLEANUP_FUNC(XdgAppRemote, g_object_unremote) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(XdgAppRemote, g_object_unref) #endif XDG_APP_EXTERN const char * xdg_app_remote_get_name (XdgAppRemote *self);