1 reported upstream: http://lists.freedesktop.org/archives/xcb/2011-June/007095.html
3 diff -ru libxcb-1.7.orig/configure.ac libxcb-1.7/configure.ac
4 --- libxcb-1.7.orig/configure.ac 2011-06-08 09:12:30 +0200
5 +++ libxcb-1.7/configure.ac 2011-06-08 09:54:49 +0200
7 AC_SEARCH_LIBS(getaddrinfo, socket)
8 AC_SEARCH_LIBS(connect, socket)
10 +AC_CHECK_FUNC(getaddrinfo, [AC_DEFINE(HAVE_GETADDRINFO, 1, [getaddrinfo() function is available])], )
14 AC_DEFINE([HAVE_ABSTRACT_SOCKETS], 1, [Define if your platform supports abstract sockets])
15 diff -ru libxcb-1.7.orig/src/xcb_auth.c libxcb-1.7/src/xcb_auth.c
16 --- libxcb-1.7.orig/src/xcb_auth.c 2011-06-08 09:12:30 +0200
17 +++ libxcb-1.7/src/xcb_auth.c 2011-06-08 09:54:49 +0200
19 #include <sys/param.h>
22 +#include <arpa/inet.h>
25 +/* _don't_ ask. interix has INADDR_LOOPBACK in here. */
26 +#include <rpc/types.h>
31 diff -ru libxcb-1.7.orig/src/xcb_util.c libxcb-1.7/src/xcb_util.c
32 --- libxcb-1.7.orig/src/xcb_util.c 2011-06-08 09:12:30 +0200
33 +++ libxcb-1.7/src/xcb_util.c 2011-06-08 09:56:23 +0200
38 +#include <arpa/inet.h>
43 static int _xcb_open_tcp(const char *host, char *protocol, const unsigned short port)
47 struct addrinfo hints;
48 char service[6]; /* "65535" with the trailing '\0' */
49 struct addrinfo *results, *addr;
53 if (protocol && strcmp("tcp",protocol) && strcmp("inet",protocol)
60 memset(&hints, 0, sizeof(hints));
62 hints.ai_flags |= AI_ADDRCONFIG;
65 freeaddrinfo(results);
70 + struct sockaddr_in _s;
71 + struct in_addr ** _c;
73 + if((_h = gethostbyname(host)) == NULL)
76 + _c = (struct in_addr**)_h->h_addr_list;
80 + _s.sin_family = AF_INET;
81 + _s.sin_port = htons(port);
82 + _s.sin_addr = *(*_c);
84 + fd = _xcb_socket(_s.sin_family, SOCK_STREAM, 0);
87 + setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, &on, sizeof(on));
88 + setsockopt(fd, SOL_SOCKET, SO_KEEPALIVE, &on, sizeof(on));
90 + if(connect(fd, (struct sockaddr*)&_s, sizeof(_s)) >= 0)
103 static int _xcb_open_unix(char *protocol, const char *file)