summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@redhat.com>2014-06-27 11:32:23 +0200
committerNikos Mavrogiannopoulos <nmav@redhat.com>2014-06-27 11:32:23 +0200
commit68e55c4a7047fccabe4a1a5aa220aa5cba8abfbe (patch)
treef45ec2068c8718c158e51eb2a5de6a707e61716e
parent492c2b937ab66134d0b37499a6f3a747e19bc31a (diff)
downloadgnutls-68e55c4a7047fccabe4a1a5aa220aa5cba8abfbe.tar.gz
check of inet_pton instead for AF_INET6
-rw-r--r--configure.ac2
-rw-r--r--lib/x509/rfc2818_hostname.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index 936978e3bc..0a6f7c0363 100644
--- a/configure.ac
+++ b/configure.ac
@@ -145,7 +145,7 @@ AC_C_BIGENDIAN
dnl No fork on MinGW, disable some self-tests until we fix them.
dnl Check clock_gettime and pthread_mutex_lock in libc (avoid linking to other libs)
-AC_CHECK_FUNCS([fork inet_ntop getrusage getpwuid_r nanosleep daemon getpid clock_gettime iconv localtime vasprintf],,)
+AC_CHECK_FUNCS([fork inet_ntop inet_pton getrusage getpwuid_r nanosleep daemon getpid clock_gettime iconv localtime vasprintf],,)
AM_CONDITIONAL(HAVE_FORK, test "$ac_cv_func_fork" != "no")
AC_LIB_HAVE_LINKFLAGS(rt,, [#include <time.h>
diff --git a/lib/x509/rfc2818_hostname.c b/lib/x509/rfc2818_hostname.c
index 725a861bc8..ee21458c08 100644
--- a/lib/x509/rfc2818_hostname.c
+++ b/lib/x509/rfc2818_hostname.c
@@ -123,7 +123,7 @@ gnutls_x509_crt_check_hostname2(gnutls_x509_crt_t cert,
if ((p=strchr(hostname, ':')) != NULL || inet_aton(hostname, &ipv4) != 0) {
if (p != NULL) {
-#ifdef AF_INET6
+#ifdef HAVE_INET_PTON
struct in6_addr ipv6;
ret = inet_pton(AF_INET6, hostname, &ipv6);