mirror of
https://gitlab.freedesktop.org/libfprint/fprintd.git
synced 2026-02-01 05:40:28 +01:00
Add compatibility defines to allow compiling with older glib
We need at least the GFlagsClass autoptr, but just pull in most of the definitions from libfprint.
This commit is contained in:
parent
7d22a2b5b9
commit
32ee94c8a0
1 changed files with 15 additions and 0 deletions
|
|
@ -91,3 +91,18 @@ FprintDevice *fprint_device_new (FpDevice *dev);
|
|||
guint32 _fprint_device_get_id (FprintDevice *rdev);
|
||||
/* Print */
|
||||
/* TODO */
|
||||
|
||||
|
||||
/* Some compatibility definitions for older GLib. Copied from from libfprint. */
|
||||
#if !GLIB_CHECK_VERSION (2, 57, 0)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GTypeClass, g_type_class_unref);
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GEnumClass, g_type_class_unref);
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GFlagsClass, g_type_class_unref);
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GParamSpec, g_param_spec_unref);
|
||||
#else
|
||||
/* Re-define G_SOURCE_FUNC as we are technically not allowed to use it with
|
||||
* the version we depend on currently. */
|
||||
#undef G_SOURCE_FUNC
|
||||
#endif
|
||||
|
||||
#define G_SOURCE_FUNC(f) ((GSourceFunc) (void (*)(void))(f))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue