summaryrefslogtreecommitdiff
path: root/src/xcb_util.c
diff options
context:
space:
mode:
authorBart Massey <bart@cs.pdx.edu>2007-11-24 14:53:54 -0800
committerBart Massey <bart@cs.pdx.edu>2007-11-24 14:53:54 -0800
commit9bf8329b50a8edacf00efb074f73c3bb759f7c8d (patch)
treea67ddc901305b62315a0ae2f034576ec93dc9440 /src/xcb_util.c
parent0593989103c48cc10165066d985c9f2d3355926b (diff)
make IPv6 optional
Diffstat (limited to 'src/xcb_util.c')
-rw-r--r--src/xcb_util.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/xcb_util.c b/src/xcb_util.c
index dd2305a..3eacc0d 100644
--- a/src/xcb_util.c
+++ b/src/xcb_util.c
@@ -216,6 +216,7 @@ static int _xcb_open_tcp(char *host, char *protocol, const unsigned short port)
if (protocol && strcmp("tcp",protocol))
return -1;
+#ifdef AF_INET6
/* Allow IPv6 addresses enclosed in brackets. */
if(host[0] == '[' && (bracket = strrchr(host, ']')) && bracket[1] == '\0')
{
@@ -224,6 +225,7 @@ static int _xcb_open_tcp(char *host, char *protocol, const unsigned short port)
hints.ai_flags |= AI_NUMERICHOST;
hints.ai_family = AF_INET6;
}
+#endif
snprintf(service, sizeof(service), "%hu", port);
if(getaddrinfo(host, service, &hints, &results))