From 1af69c9609af41165498e7a1bfda3f32744f12fe Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Sat, 7 Dec 2013 22:31:58 +0100 Subject: [PATCH] Fix compile on OpenBSD. --- src/connection.c | 2 ++ tests/client.c | 2 ++ 2 files changed, 4 insertions(+) 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) { -- 2.45.2