diff options
author | Patrick Griffis <pgriffis@igalia.com> | 2022-03-18 14:22:38 +0000 |
---|---|---|
committer | Philip Withnall <pwithnall@endlessos.org> | 2022-03-22 12:40:12 +0000 |
commit | 5cdacced3fe58965d1ff592bd8fc3c100accede4 (patch) | |
tree | 87047f106a8e13f027248eb6e70807292aa77312 /gio/meson.build | |
parent | 96efd662c990c4f9afb23b39ce0214b0f440d53a (diff) | |
download | glib-5cdacced3fe58965d1ff592bd8fc3c100accede4.tar.gz |
tests: Add basic test framework for GResolver DNS parsing
Split out from https://gitlab.gnome.org/GNOME/glib/-/merge_requests/2134
by Philip Withnall so it can be used in advance of HTTPS DNS record
support landing.
Reworked to no longer use test fixtures, as it’s simple enough to build
the response header in each test.
The tests are built on Unix only, as they test the parsing code in
`g_resolver_records_from_res_query()`, which is Unix-specific. The
Windows DNS APIs provide much more structured results which don’t need
parsing.
Diffstat (limited to 'gio/meson.build')
-rw-r--r-- | gio/meson.build | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gio/meson.build b/gio/meson.build index 874de4b15..543763eea 100644 --- a/gio/meson.build +++ b/gio/meson.build @@ -74,6 +74,14 @@ if host_system != 'windows' endif endif + # dn_comp() + if cc.links('''#include <resolv.h> + int main (int argc, char ** argv) { + return dn_comp(NULL, NULL, 0, NULL, NULL) == -1; + } ''', args : network_args, name : 'dn_comp()') + glib_conf.set('HAVE_DN_COMP', 1) + endif + # res_nclose() if cc.links('''#include <sys/types.h> #include <netinet/in.h> |