From b3dfd8d3e2cd9412b598d2c5c26228cdc930cc0b Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Mon, 11 Feb 2019 23:10:12 +0100 Subject: [PATCH] use idn2.h or idna.h depending on HAVE_LIBIDN/HAVE_LIBIDN --- configure.ac | 2 +- src/util/dnsparser.c | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 38182599f..14360284a 100644 --- a/configure.ac +++ b/configure.ac @@ -862,7 +862,7 @@ AS_IF([test x$my_with_libidn2 = x1], LIBS="-lidn2 $LIBS" AC_DEFINE_UNQUOTED([HAVE_LIBIDN2], [1], - [Define to 1 if you have 'libidn2' (-lidn).])], + [Define to 1 if you have 'libidn2' (-lidn2).])], [MISSING_DEPS="${MISSING_DEPS}${MISSING_SEP}libidn2" MISSING_SEP=", "])]) AM_CONDITIONAL(HAVE_LIBIDN2, test x$working_libidn2 = x1) diff --git a/src/util/dnsparser.c b/src/util/dnsparser.c index 2baa76ef2..55a9ff6c8 100644 --- a/src/util/dnsparser.c +++ b/src/util/dnsparser.c @@ -25,15 +25,19 @@ * @author Christian Grothoff */ #include "platform.h" +#if HAVE_LIBIDN2 #if HAVE_IDN2_H #include #elif HAVE_IDN2_IDN2_H #include -#elif HAVE_IDNA_H +#endif +#elif HAVE_LIBIDN +#if HAVE_IDNA_H #include #elif HAVE_IDN_IDNA_H #include #endif +#endif #if WINDOWS #include #endif -- 2.25.1