void-packages/srcpkgs/bolt/patches/a9fda276415abb4c0ae7031271c2d5703c435086.patch
2018-09-16 15:54:37 -03:00

32 lines
970 B
Diff

From a9fda276415abb4c0ae7031271c2d5703c435086 Mon Sep 17 00:00:00 2001
From: Christian Kellner <christian@kellner.me>
Date: Fri, 15 Jun 2018 15:43:54 +0200
Subject: [PATCH] test: common: no enum auto cleanup for glib > 2.57
Newer glib (starting with 2.57) have gained support for autoptr
cleanup functions for GEnumClass and GFlagsClass, so we don't
need to define our own ones anymore.
This change was already done to bolt-enums.c, but also is needed
for the test.
---
tests/test-common.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tests/test-common.c b/tests/test-common.c
index c44d8ae..eb50a81 100644
--- tests/test-common.c
+++ tests/test-common.c
@@ -43,8 +43,10 @@
#include <sys/stat.h>
#include <unistd.h> /* unlinkat */
+#if !GLIB_CHECK_VERSION (2, 57, 0)
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GEnumClass, g_type_class_unref);
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GFlagsClass, g_type_class_unref);
+#endif
static void
cleanup_dir (DIR *d)
--
2.18.0