]> git.proxmox.com Git - pve-cluster.git/commitdiff
pmxcfs: tests: make add_test signature backward compatible
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Sun, 31 Jan 2021 02:21:48 +0000 (03:21 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Sun, 31 Jan 2021 02:21:50 +0000 (03:21 +0100)
we still need to be able to build with the libcheck version from
buster..

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
data/src/check_memdb.c

index 0eb75c7e478e28b668753a085a0c3067ce6ee8e2..d7eb05fb40525bd9530bd63eaea388d3e1b6949d 100644 (file)
 #include "status.h"
 #include "memdb.h"
 
+#if CHECK_MAJOR_VERSION == 0 && CHECK_MINOR_VERSION <= 10
+#define _TEST_TYPE TFun
+#else
+#define _TEST_TYPE const TTest *
+#endif
+
 cfs_t cfs = {
        .debug = 0,
        .nodename = "testnode",
@@ -258,7 +264,7 @@ END_TEST
 static void
 add_test(
        Suite *s,
-       const TTest *tf,
+       _TEST_TYPE tf,
        const char *name)
 {
        TCase *tc = tcase_create (name);