diff --git a/common/Makefile.am.inc b/common/Makefile.am.inc index e7d8d754..8e81b0ef 100644 --- a/common/Makefile.am.inc +++ b/common/Makefile.am.inc @@ -56,6 +56,7 @@ libflatpak_common_la_CFLAGS = \ $(HIDDEN_VISIBILITY_CFLAGS) \ $(OSTREE_CFLAGS) \ $(SOUP_CFLAGS) \ + $(JSON_CFLAGS) \ $(XAUTH_CFLAGS) \ $(LIBSECCOMP_CFLAGS) \ -I$(srcdir)/dbus-proxy \ diff --git a/common/flatpak-utils.h b/common/flatpak-utils.h index 1147a619..9c121036 100644 --- a/common/flatpak-utils.h +++ b/common/flatpak-utils.h @@ -30,6 +30,7 @@ #include #include "flatpak-dbus.h" #include +#include typedef enum { FLATPAK_HOST_COMMAND_FLAGS_CLEAR_ENV = 1 << 0, @@ -433,6 +434,17 @@ G_DEFINE_AUTOPTR_CLEANUP_FUNC (SoupRequestHTTP, g_object_unref) G_DEFINE_AUTOPTR_CLEANUP_FUNC (SoupURI, soup_uri_free) #endif +#if !JSON_CHECK_VERSION(1,2,0) +G_DEFINE_AUTOPTR_CLEANUP_FUNC (JsonArray, json_array_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC (JsonBuilder, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC (JsonGenerator, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC (JsonNode, json_node_free) +G_DEFINE_AUTOPTR_CLEANUP_FUNC (JsonObject, json_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC (JsonParser, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC (JsonPath, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC (JsonReader, g_object_unref) +#endif + #if !GLIB_CHECK_VERSION(2, 43, 4) G_DEFINE_AUTOPTR_CLEANUP_FUNC(GUnixFDList, g_object_unref) #endif diff --git a/document-portal/Makefile.am.inc b/document-portal/Makefile.am.inc index 79c37e2b..2bf41049 100644 --- a/document-portal/Makefile.am.inc +++ b/document-portal/Makefile.am.inc @@ -35,4 +35,4 @@ xdg_document_portal_SOURCES = \ $(NULL) xdg_document_portal_LDADD = $(BASE_LIBS) $(FUSE_LIBS) libflatpak-common.la -xdg_document_portal_CFLAGS = $(BASE_CFLAGS) $(OSTREE_CFLAGS) $(SOUP_CFLAGS) $(FUSE_CFLAGS) -I$(srcdir)/document-portal -I$(builddir)/document-portal -I$(srcdir)/permission-store -I$(builddir)/permission-store -DFLATPAK_COMPILATION +xdg_document_portal_CFLAGS = $(BASE_CFLAGS) $(OSTREE_CFLAGS) $(SOUP_CFLAGS) $(JSON_CFLAGS) $(FUSE_CFLAGS) -I$(srcdir)/document-portal -I$(builddir)/document-portal -I$(srcdir)/permission-store -I$(builddir)/permission-store -DFLATPAK_COMPILATION diff --git a/lib/Makefile.am.inc b/lib/Makefile.am.inc index d3a2ad93..9e3f81d1 100644 --- a/lib/Makefile.am.inc +++ b/lib/Makefile.am.inc @@ -75,6 +75,7 @@ libflatpak_la_CFLAGS = \ $(BASE_CFLAGS) \ $(OSTREE_CFLAGS) \ $(SOUP_CFLAGS) \ + $(JSON_CFLAGS) \ $(NULL) libflatpak_la_LDFLAGS = \ diff --git a/permission-store/Makefile.am.inc b/permission-store/Makefile.am.inc index 0839cd4f..85f2b650 100644 --- a/permission-store/Makefile.am.inc +++ b/permission-store/Makefile.am.inc @@ -31,4 +31,4 @@ xdg_permission_store_SOURCES = \ $(NULL) xdg_permission_store_LDADD = $(BASE_LIBS) libflatpak-common.la -xdg_permission_store_CFLAGS = $(BASE_CFLAGS) $(SOUP_CFLAGS) $(OSTREE_CFLAGS) $(GSYSTEM_CFLAGS) -I$(srcdir)/permission-store -I$(builddir)/permission-store +xdg_permission_store_CFLAGS = $(BASE_CFLAGS) $(SOUP_CFLAGS) $(JSON_CFLAGS) $(OSTREE_CFLAGS) $(GSYSTEM_CFLAGS) -I$(srcdir)/permission-store -I$(builddir)/permission-store diff --git a/session-helper/Makefile.am.inc b/session-helper/Makefile.am.inc index 412a20b8..4a51f150 100644 --- a/session-helper/Makefile.am.inc +++ b/session-helper/Makefile.am.inc @@ -13,4 +13,4 @@ flatpak_session_helper_SOURCES = \ $(NULL) flatpak_session_helper_LDADD = $(BASE_LIBS) libflatpak-common.la -flatpak_session_helper_CFLAGS = $(BASE_CFLAGS) $(SOUP_CFLAGS) $(OSTREE_CFLAGS) $(GSYSTEM_CFLAGS) +flatpak_session_helper_CFLAGS = $(BASE_CFLAGS) $(SOUP_CFLAGS) $(OSTREE_CFLAGS) $(GSYSTEM_CFLAGS) $(JSON_CFLAGS)