pkgsrc-wip/libxcb/patches/patch-af
2008-03-25 20:51:34 +00:00

20 lines
692 B
Text

$NetBSD: patch-af,v 1.1 2008/03/25 20:51:34 bsadewitz Exp $
--- src/xcb_util.c.orig 2007-10-23 12:44:59.000000000 -0400
+++ src/xcb_util.c
@@ -216,6 +216,7 @@ static int _xcb_open_tcp(char *host, cha
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, cha
hints.ai_flags |= AI_NUMERICHOST;
hints.ai_family = AF_INET6;
}
+#endif
snprintf(service, sizeof(service), "%hu", port);
if(getaddrinfo(host, service, &hints, &results))