From: Christian Grothoff Date: Mon, 11 Feb 2019 22:10:12 +0000 (+0100) Subject: use idn2.h or idna.h depending on HAVE_LIBIDN/HAVE_LIBIDN X-Git-Tag: v0.11.0~63^2~94^2~1 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=b3dfd8d3e2cd9412b598d2c5c26228cdc930cc0b;p=oweals%2Fgnunet.git use idn2.h or idna.h depending on HAVE_LIBIDN/HAVE_LIBIDN --- 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