From d0e735e2c223421c132baaff08df8e0b9dcd5205 Mon Sep 17 00:00:00 2001 From: leitner Date: Fri, 20 Mar 2015 14:58:13 +0000 Subject: [PATCH] support noipv6 being set externally even when there is perfectly good IPv6 support. --- socket/socket_tcp6.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/socket/socket_tcp6.c b/socket/socket_tcp6.c index f0cfd01..1e6689c 100644 --- a/socket/socket_tcp6.c +++ b/socket/socket_tcp6.c @@ -12,7 +12,7 @@ int socket_tcp6(void) { int s; #if defined(LIBC_HAS_IP6) && defined(SOCK_NONBLOCK) - if ((s=socket(PF_INET6,SOCK_STREAM|SOCK_NONBLOCK,IPPROTO_TCP))>-1 || errno!=EINVAL) return s; + if ((s=socket(noipv6?PF_INET:PF_INET6,SOCK_STREAM|SOCK_NONBLOCK,IPPROTO_TCP))>-1 || errno!=EINVAL) return s; #endif s=socket_tcp6b(); if (s==-1) return -1;