From: Simon Ruderich Date: Sat, 7 Dec 2013 21:31:58 +0000 (+0100) Subject: Fix compile on OpenBSD. X-Git-Url: https://ruderich.org/simon/gitweb/?a=commitdiff_plain;h=1af69c9609af41165498e7a1bfda3f32744f12fe;p=tlsproxy%2Ftlsproxy.git Fix compile on OpenBSD. --- diff --git a/src/connection.c b/src/connection.c index ad7298a..4538f75 100644 --- a/src/connection.c +++ b/src/connection.c @@ -844,7 +844,9 @@ static int connect_to_host(const char *hostname, const char *port) { gai_hints.ai_socktype = SOCK_STREAM; gai_hints.ai_protocol = 0; gai_hints.ai_flags = AI_NUMERICSERV /* given port is numeric */ +#ifdef AI_ADDRCONFIG | AI_ADDRCONFIG /* supported by this computer */ +#endif ; gai_return = getaddrinfo(hostname, port, &gai_hints, &gai_result); if (gai_return != 0) { diff --git a/tests/client.c b/tests/client.c index 23dca4b..798c5cb 100644 --- a/tests/client.c +++ b/tests/client.c @@ -224,7 +224,9 @@ static int connect_to_host(const char *hostname, const char *port) { gai_hints.ai_socktype = SOCK_STREAM; gai_hints.ai_protocol = 0; gai_hints.ai_flags = AI_NUMERICSERV /* given port is numeric */ +#ifdef AI_ADDRCONFIG | AI_ADDRCONFIG /* supported by this computer */ +#endif ; gai_return = getaddrinfo(hostname, port, &gai_hints, &gai_result); if (gai_return != 0) {