libsysprof: backport autoptr cleanups when necessary

This commit is contained in:
Christian Hergert
2019-05-10 12:53:36 -07:00
parent 623d7ad027
commit 280f4b9415
2 changed files with 13 additions and 0 deletions

View File

@ -0,0 +1,12 @@
#pragma once
#include "config.h"
#ifndef HAVE_POLKIT_AUTOPTR
# include <polkit/polkit.h>
G_DEFINE_AUTOPTR_CLEANUP_FUNC (PolkitAuthority, g_object_unref)
G_DEFINE_AUTOPTR_CLEANUP_FUNC (PolkitAuthorizationResult, g_object_unref)
G_DEFINE_AUTOPTR_CLEANUP_FUNC (PolkitSubject, g_object_unref)
#endif

View File

@ -26,6 +26,7 @@
#include <polkit/polkit.h>
#include "sysprof-helpers.h"
#include "sysprof-backport-autocleanups.h"
#include "helpers.h"
#include "ipc-service.h"