aboutsummaryrefslogtreecommitdiff
path: root/resolv
diff options
context:
space:
mode:
Diffstat (limited to 'resolv')
-rw-r--r--resolv/tst-resolv-ai_idn-latin1.c5
-rw-r--r--resolv/tst-resolv-ai_idn.c5
2 files changed, 10 insertions, 0 deletions
diff --git a/resolv/tst-resolv-ai_idn-latin1.c b/resolv/tst-resolv-ai_idn-latin1.c
index 4a6bf5623c..5c515958c2 100644
--- a/resolv/tst-resolv-ai_idn-latin1.c
+++ b/resolv/tst-resolv-ai_idn-latin1.c
@@ -29,6 +29,11 @@ do_test (void)
void *handle = dlopen (LIBIDN2_SONAME, RTLD_LAZY);
if (handle == NULL)
FAIL_UNSUPPORTED ("libidn2 not installed");
+ void *check_ver_sym = xdlsym (handle, "idn2_check_version");
+ const char *check_res
+ = ((const char *(*) (const char *)) check_ver_sym) ("2.0.5");
+ if (check_res == NULL)
+ FAIL_UNSUPPORTED ("libidn2 too old");
if (setlocale (LC_CTYPE, "en_US.ISO-8859-1") == NULL)
FAIL_EXIT1 ("setlocale: %m");
diff --git a/resolv/tst-resolv-ai_idn.c b/resolv/tst-resolv-ai_idn.c
index 493d1c7741..046842769a 100644
--- a/resolv/tst-resolv-ai_idn.c
+++ b/resolv/tst-resolv-ai_idn.c
@@ -28,6 +28,11 @@ do_test (void)
void *handle = dlopen (LIBIDN2_SONAME, RTLD_LAZY);
if (handle == NULL)
FAIL_UNSUPPORTED ("libidn2 not installed");
+ void *check_ver_sym = xdlsym (handle, "idn2_check_version");
+ const char *check_res
+ = ((const char *(*) (const char *)) check_ver_sym) ("2.0.5");
+ if (check_res == NULL)
+ FAIL_UNSUPPORTED ("libidn2 too old");
if (setlocale (LC_CTYPE, "en_US.UTF-8") == NULL)
FAIL_EXIT1 ("setlocale: %m");