Files
haikuports/x11-libs/libxcb/patches/libxcb-1.12.patchset
2017-10-26 15:35:26 +02:00

38 lines
1.1 KiB
Plaintext

From 002b746f8948f0618e686b5b76b229efa55009ee Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Thu, 26 Oct 2017 14:53:57 +0200
Subject: Haiku patch
diff --git a/configure.ac b/configure.ac
index ec31542..a5afc88 100644
--- a/configure.ac
+++ b/configure.ac
@@ -87,8 +87,8 @@ AC_MSG_RESULT($XCBPROTO_XCBPYTHONDIR)
AC_SUBST(XCBPROTO_XCBPYTHONDIR)
AC_HEADER_STDC
-AC_SEARCH_LIBS(getaddrinfo, socket)
-AC_SEARCH_LIBS(connect, socket)
+AC_SEARCH_LIBS(getaddrinfo, [network socket])
+AC_SEARCH_LIBS(connect, [network socket])
# Find support for sending a message from a socket
AC_SEARCH_LIBS(sendmsg, socket, [have_sendmsg="yes"], [have_sendmsg="no"])
diff --git a/src/xcb_util.c b/src/xcb_util.c
index a3357ef..98fd793 100644
--- a/src/xcb_util.c
+++ b/src/xcb_util.c
@@ -437,7 +437,7 @@ static int _xcb_open_unix(char *protocol, const char *file)
strcpy(addr.sun_path, file);
addr.sun_family = AF_UNIX;
#ifdef HAVE_SOCKADDR_SUN_LEN
- addr.sun_len = SUN_LEN(&addr);
+ addr.sun_len = sizeof(&addr);
#endif
fd = _xcb_socket(AF_UNIX, SOCK_STREAM, 0);
if(fd == -1)
--
2.14.2