aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEvgeny Grin (Karlson2k) <k2k@narod.ru>2020-10-06 21:37:46 +0300
committerEvgeny Grin (Karlson2k) <k2k@narod.ru>2020-10-07 11:23:48 +0300
commitd4b9fc7ee15bad4cee47c91e5ecd2c05b069a70a (patch)
tree03b918757f70ca476dc17f49501031535d278994 /src
parentb47b1c94e28069cf4f46c65713d99d2f0f55bb9c (diff)
downloadlibmicrohttpd-d4b9fc7ee15bad4cee47c91e5ecd2c05b069a70a.tar.gz
libmicrohttpd-d4b9fc7ee15bad4cee47c91e5ecd2c05b069a70a.zip
configure: check whether IPv6 could be used for testing
Diffstat (limited to 'src')
-rw-r--r--src/microhttpd/test_options.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/microhttpd/test_options.c b/src/microhttpd/test_options.c
index 9685837e..575b6a2b 100644
--- a/src/microhttpd/test_options.c
+++ b/src/microhttpd/test_options.c
@@ -84,7 +84,7 @@ test_ip_addr_option ()
84{ 84{
85 struct MHD_Daemon *d; 85 struct MHD_Daemon *d;
86 struct sockaddr_in daemon_ip_addr; 86 struct sockaddr_in daemon_ip_addr;
87#if HAVE_INET6 87#if HAVE_INET6 && defined (USE_IPV6_TESTING)
88 struct sockaddr_in6 daemon_ip_addr6; 88 struct sockaddr_in6 daemon_ip_addr6;
89#endif 89#endif
90 90
@@ -93,7 +93,7 @@ test_ip_addr_option ()
93 daemon_ip_addr.sin_port = 0; 93 daemon_ip_addr.sin_port = 0;
94 daemon_ip_addr.sin_addr.s_addr = htonl (INADDR_LOOPBACK); 94 daemon_ip_addr.sin_addr.s_addr = htonl (INADDR_LOOPBACK);
95 95
96#if HAVE_INET6 96#if HAVE_INET6 && defined (USE_IPV6_TESTING)
97 memset (&daemon_ip_addr6, 0, sizeof (struct sockaddr_in6)); 97 memset (&daemon_ip_addr6, 0, sizeof (struct sockaddr_in6));
98 daemon_ip_addr6.sin6_family = AF_INET6; 98 daemon_ip_addr6.sin6_family = AF_INET6;
99 daemon_ip_addr6.sin6_port = 0; 99 daemon_ip_addr6.sin6_port = 0;
@@ -109,7 +109,7 @@ test_ip_addr_option ()
109 109
110 MHD_stop_daemon (d); 110 MHD_stop_daemon (d);
111 111
112#if HAVE_INET6 112#if HAVE_INET6 && defined (USE_IPV6_TESTING)
113 d = MHD_start_daemon (MHD_USE_ERROR_LOG | MHD_USE_IPv6, 0, 113 d = MHD_start_daemon (MHD_USE_ERROR_LOG | MHD_USE_IPv6, 0,
114 NULL, NULL, &ahc_echo, NULL, MHD_OPTION_SOCK_ADDR, 114 NULL, NULL, &ahc_echo, NULL, MHD_OPTION_SOCK_ADDR,
115 &daemon_ip_addr6, MHD_OPTION_END); 115 &daemon_ip_addr6, MHD_OPTION_END);