From fb4df592a055669b8046e2d0a263b8cc49633fb0 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Wed, 31 Oct 2018 08:02:25 +0100 Subject: swrap: Protect IPv6 case in swrap_socket() Fixes the build on OmniOS Signed-off-by: Andreas Schneider Reviewed-by: Ralph Boehme --- src/socket_wrapper.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/socket_wrapper.c b/src/socket_wrapper.c index 5e3a47b..a107710 100644 --- a/src/socket_wrapper.c +++ b/src/socket_wrapper.c @@ -3098,6 +3098,7 @@ static int swrap_socket(int family, int type, int protocol) memcpy(&si->myname.sa.in, &sin, si->myname.sa_socklen); break; } +#ifdef HAVE_IPV6 case AF_INET6: { struct sockaddr_in6 sin6 = { .sin6_family = AF_INET6, @@ -3107,6 +3108,7 @@ static int swrap_socket(int family, int type, int protocol) memcpy(&si->myname.sa.in6, &sin6, si->myname.sa_socklen); break; } +#endif default: errno = EINVAL; return -1; -- cgit