tests: Fix compilation of resolver-parsing test on FreeBSD

This fixes commit cdcb179808.

`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 <pwithnall@gnome.org>
This commit is contained in:
Philip Withnall 2024-07-09 21:41:03 +01:00
parent ef57fa8a29
commit 929f2ae06b
No known key found for this signature in database
GPG Key ID: DCDF5885B1F3ED73

View File

@ -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