diff options
author | Andreas Schneider <asn@samba.org> | 2018-10-31 08:02:25 +0100 |
---|---|---|
committer | Andreas Schneider <asn@samba.org> | 2018-11-06 15:00:26 +0100 |
commit | fb4df592a055669b8046e2d0a263b8cc49633fb0 (patch) | |
tree | 296999844b4e8936e867ec37cd5b2b95b778342f | |
parent | 916ce9c66576f4de24dfe774fe9ab094187c1462 (diff) | |
download | socket_wrapper-fb4df592a055669b8046e2d0a263b8cc49633fb0.tar.gz socket_wrapper-fb4df592a055669b8046e2d0a263b8cc49633fb0.tar.xz socket_wrapper-fb4df592a055669b8046e2d0a263b8cc49633fb0.zip |
swrap: Protect IPv6 case in swrap_socket()
Fixes the build on OmniOS
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
-rw-r--r-- | src/socket_wrapper.c | 2 |
1 files changed, 2 insertions, 0 deletions
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; |