Commit 8ab4f403 authored by Richard Hughes's avatar Richard Hughes
Browse files

Fix compile with newer versions of GUdev

parent 71bf09fe
......@@ -170,6 +170,14 @@ AS_IF([test "$have_polkit_0_114" = "yes"], [
[Define as 1 if you have polkit >= 0.114])
])
# 232 introduced autocleanup functions for its types
PKG_CHECK_MODULES([GUDEV_232], [gudev-1.0 >= 232],
[have_gudev_232=yes], [have_gudev_232=no])
AS_IF([test "$have_gudev_232" = "yes"], [
AC_DEFINE([HAVE_GUDEV_232],[1],
[Define as 1 if you have gudev >= 0.232])
])
# ColorHug support
AC_ARG_ENABLE(colorhug,
AS_HELP_STRING([--enable-colorhug],
......
......@@ -51,7 +51,9 @@ G_DEFINE_TYPE_WITH_PRIVATE (FuDeviceAltos, fu_device_altos, FU_TYPE_DEVICE)
#define GET_PRIVATE(o) (fu_device_altos_get_instance_private (o))
#ifndef HAVE_GUDEV_232
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GUdevClient, g_object_unref)
#endif
/**
* fu_device_altos_kind_from_string:
......
......@@ -39,7 +39,7 @@
#include "fu-pending.h"
#include "fu-plugin-private.h"
#ifndef GUdevClient_autoptr
#ifndef HAVE_GUDEV_232
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GUdevClient, g_object_unref)
#endif
......
Supports Markdown
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