Fix IPv6 define
authorRich Salz <rsalz@openssl.org>
Sun, 7 Jan 2018 20:58:52 +0000 (15:58 -0500)
committerRich Salz <rsalz@openssl.org>
Sun, 7 Jan 2018 21:59:15 +0000 (16:59 -0500)
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5030)

include/internal/sockets.h

index 3758b92..4e914a2 100644 (file)
@@ -120,7 +120,11 @@ struct servent *PASCAL getservbyname(const char *, const char *);
  * bad versions.
  */
 # if !defined(OPENSSL_USE_IPV6)
-#  define OPENSSL_USE_IPV6 1
+#  if defined(AF_INET6)
+#   define OPENSSL_USE_IPV6 1
+#  else
+#   define OPENSSL_USE_IPV6 0
+#  endif
 # endif
 
 # define get_last_socket_error() errno