summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJamey Sharp <jamey@minilop.net>2006-11-24 13:24:05 -0800
committerJamey Sharp <jamey@minilop.net>2006-11-24 13:24:05 -0800
commit3360d0c79e98cf6b7f30b2d84f117aea0a28595d (patch)
tree26ff64aa0daa70be7e504c96475877b9f0a434c4
parent818811a7ac660e46d0dca1cbf9e53ad0475af330 (diff)
NetBSD doesn't have AI_ADDRCONFIG: use it only if it's available.
-rw-r--r--src/xcb_util.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/xcb_util.c b/src/xcb_util.c
index bd9f2b5..eeee1dd 100644
--- a/src/xcb_util.c
+++ b/src/xcb_util.c
@@ -176,7 +176,10 @@ static int _xcb_open_decnet(const char *host, const unsigned short port)
static int _xcb_open_tcp(char *host, const unsigned short port)
{
int fd = -1;
- struct addrinfo hints = { AI_ADDRCONFIG
+ struct addrinfo hints = { 0
+#ifdef AI_ADDRCONFIG
+ | AI_ADDRCONFIG
+#endif
#ifdef AI_NUMERICSERV
| AI_NUMERICSERV
#endif