diff options
author | Andreas Schneider <asn@samba.org> | 2018-10-31 08:04:03 +0100 |
---|---|---|
committer | Andreas Schneider <asn@samba.org> | 2018-11-06 15:00:32 +0100 |
commit | f690f8c0873d87359f9d3c11e46c8c4dc185af0e (patch) | |
tree | c15cefe6db8c363ae8af41b3579c13af4889e287 /tests/echo_srv.c | |
parent | fb4df592a055669b8046e2d0a263b8cc49633fb0 (diff) | |
download | socket_wrapper-f690f8c0873d87359f9d3c11e46c8c4dc185af0e.tar.gz socket_wrapper-f690f8c0873d87359f9d3c11e46c8c4dc185af0e.tar.xz socket_wrapper-f690f8c0873d87359f9d3c11e46c8c4dc185af0e.zip |
tests: Protect IPv6 case in echo_srv
This fixes the build on OmniOS.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Diffstat (limited to 'tests/echo_srv.c')
-rw-r--r-- | tests/echo_srv.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/echo_srv.c b/tests/echo_srv.c index 9a81c42..957a3ad 100644 --- a/tests/echo_srv.c +++ b/tests/echo_srv.c @@ -98,6 +98,7 @@ static const char *echo_server_address(int family) return ECHO_SRV_IPV4; } +#ifdef HAVE_IPV6 case AF_INET6: { const char *ip6 = getenv("TORTURE_SERVER_ADDRESS_IPV6"); @@ -107,6 +108,7 @@ static const char *echo_server_address(int family) return ECHO_SRV_IPV6; } +#endif default: return NULL; } @@ -404,6 +406,7 @@ static int socket_dup(int s) } break; } +#ifdef HAVE_IPV6 case AF_INET6: { rc = memcmp(&cli_addr1.sa.in6, &cli_addr2.sa.in6, sizeof(struct sockaddr_in6)); if (rc != 0) { @@ -416,6 +419,7 @@ static int socket_dup(int s) } break; } +#endif default: perror("family mismatch"); close(s2); @@ -464,6 +468,7 @@ static int socket_dup(int s) } break; } +#ifdef HAVE_IPV6 case AF_INET6: { rc = memcmp(&cli_addr1.sa.in6, &cli_addr2.sa.in6, sizeof(struct sockaddr_in6)); if (rc != 0) { @@ -476,6 +481,7 @@ static int socket_dup(int s) } break; } +#endif default: perror("family mismatch"); close(s); |