From 929f2ae06b18ee0bee9cdb6059bd05927eb82315 Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Tue, 9 Jul 2024 21:41:03 +0100 Subject: [PATCH] tests: Fix compilation of resolver-parsing test on FreeBSD This fixes commit cdcb1798085902c0342ead65d16b5733357e48c1. `dn_comp()` is needed to build fake DNS records for most of the tests in this file. The new ownership test is no exception. See https://gitlab.gnome.org/GNOME/glib/-/jobs/4058481 Signed-off-by: Philip Withnall --- gio/tests/resolver-parsing.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gio/tests/resolver-parsing.c b/gio/tests/resolver-parsing.c index babd9204a..a6c746d2a 100644 --- a/gio/tests/resolver-parsing.c +++ b/gio/tests/resolver-parsing.c @@ -227,6 +227,10 @@ test_invalid_header (void) static void test_record_ownership (void) { +#ifndef HAVE_DN_COMP + g_test_skip ("The dn_comp() function was not available."); + return; +#else GByteArray *answer = NULL, *txt_rdata = NULL; GList *records = NULL; GError *local_error = NULL; @@ -261,6 +265,7 @@ test_record_ownership (void) g_list_free_full (records, (GDestroyNotify) g_variant_unref); g_byte_array_free (answer, TRUE); +#endif } static void