Unverified Commit 5cf0b498 authored by Sebastian Krzyszkowiak's avatar Sebastian Krzyszkowiak
Browse files

PolkitAuthAgent: fix build with Polkit >= 0.114

Polkit 0.114 introduced bunch of predefined g_autoptr cleanups, which
leads to compilation failure due to duplicate cleanup definition for
PolkitSubject. Note that even the latest polkit doesn't have a cleanup
for PolkitAgentListener defined, so it's left there unguarded.
parent 8b10355f
Pipeline #20342 passed with stages
in 5 minutes and 43 seconds
......@@ -101,6 +101,11 @@ phosh_deps = [
cc.find_library('rt', required: false),
]
add_project_arguments([
'-DPOLKIT_AGENT_MAJOR_VERSION=' + libpolkit_agent_dep.version().split('.')[0],
'-DPOLKIT_AGENT_MINOR_VERSION=' + libpolkit_agent_dep.version().split('.')[1]
], language: 'c')
phosh = executable('phosh', phosh_sources,
include_directories: [root_inc, src_inc],
dependencies: phosh_deps,
......
......@@ -14,7 +14,9 @@
G_BEGIN_DECLS
/* libpolkit lacks these */
#if POLKIT_AGENT_MAJOR_VERSION == 0 && POLKIT_AGENT_MINOR_VERSION < 114
G_DEFINE_AUTOPTR_CLEANUP_FUNC(PolkitSubject, g_object_unref)
#endif
G_DEFINE_AUTOPTR_CLEANUP_FUNC(PolkitAgentListener, g_object_unref)
#define PHOSH_TYPE_POLKIT_AUTH_AGENT (phosh_polkit_auth_agent_get_type())
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment