summaryrefslogtreecommitdiffstats
path: root/tests/test_echo_tcp_bind.c
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2014-06-02 08:30:50 +0200
committerAndreas Schneider <asn@samba.org>2014-06-02 09:12:27 +0200
commit52eabf4b886135d8ace300b5e7f29b26c86a7c01 (patch)
treee9a214158104f0234f957a9848451791597d003d /tests/test_echo_tcp_bind.c
parent9e91b00ee329578987c579b2c9d6db967055a59a (diff)
downloadsocket_wrapper-52eabf4b886135d8ace300b5e7f29b26c86a7c01.tar.gz
socket_wrapper-52eabf4b886135d8ace300b5e7f29b26c86a7c01.tar.xz
socket_wrapper-52eabf4b886135d8ace300b5e7f29b26c86a7c01.zip
tests: Fix building without bindresvport().
This fixes the build on Solaris. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
Diffstat (limited to 'tests/test_echo_tcp_bind.c')
-rw-r--r--tests/test_echo_tcp_bind.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/test_echo_tcp_bind.c b/tests/test_echo_tcp_bind.c
index c699b06..d997c8b 100644
--- a/tests/test_echo_tcp_bind.c
+++ b/tests/test_echo_tcp_bind.c
@@ -308,6 +308,7 @@ static void test_bind_ipv4_addr_in_use(void **state)
close(s);
}
+#ifdef HAVE_BINDRESVPORT
static void test_bindresvport_ipv4(void **state)
{
struct sockaddr_in sin;
@@ -367,6 +368,7 @@ static void test_bindresvport_ipv4_null(void **state)
close(s);
}
+#endif /* HAVE_BINDRESVPORT */
#ifdef HAVE_IPV6
static void test_bind_on_ipv6_sock(void **state)
@@ -417,6 +419,7 @@ static void test_bind_on_ipv6_sock(void **state)
close(s);
}
+#ifdef HAVE_BINDRESVPORT
static void test_bindresvport_on_ipv6_sock(void **state)
{
struct sockaddr_in sin;
@@ -456,7 +459,7 @@ static void test_bindresvport_on_ipv6_sock_null(void **state)
close(s);
}
-
+#endif /* HAVE_BINDRESVPORT */
#endif /* HAVE_IPV6 */
int main(void) {
@@ -469,22 +472,26 @@ int main(void) {
unit_test_setup_teardown(test_bind_ipv4_addr_in_use,
setup_echo_srv_tcp_ipv4,
teardown),
+#ifdef HAVE_BINDRESVPORT
unit_test_setup_teardown(test_bindresvport_ipv4,
setup_echo_srv_tcp_ipv4,
teardown),
unit_test_setup_teardown(test_bindresvport_ipv4_null,
setup_echo_srv_tcp_ipv4,
teardown),
+#endif /* HAVE_BINDRESVPORT */
#ifdef HAVE_IPV6
unit_test_setup_teardown(test_bind_on_ipv6_sock,
setup_echo_srv_tcp_ipv6,
teardown),
+#ifdef HAVE_BINDRESVPORT
unit_test_setup_teardown(test_bindresvport_on_ipv6_sock,
setup_echo_srv_tcp_ipv6,
teardown),
unit_test_setup_teardown(test_bindresvport_on_ipv6_sock_null,
setup_echo_srv_tcp_ipv6,
teardown),
+#endif /* HAVE_BINDRESVPORT */
#endif /* HAVE_IPV6 */
};