From 75deaf2ed697236c381c25ba8463d0a73798ae21 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Jun 24 2009 16:07:48 +0000 Subject: - libxcb-1.2-no-nagle.patch: Disable Nagle's algorithm on TCP. (#442158) --- diff --git a/libxcb-1.2-no-nagle.patch b/libxcb-1.2-no-nagle.patch new file mode 100644 index 0000000..f7b2e18 --- /dev/null +++ b/libxcb-1.2-no-nagle.patch @@ -0,0 +1,30 @@ +commit ee89850e68205a7f8961ace0839b5be86040dade +Author: elupus +Date: Tue May 26 16:14:48 2009 +0200 + + Disable Nagle on TCP socket + + Signed-off-by: Julien Danjou + +diff --git a/src/xcb_util.c b/src/xcb_util.c +index adac909..55aadb7 100644 +--- a/src/xcb_util.c ++++ b/src/xcb_util.c +@@ -30,6 +30,7 @@ + #include + #include + #include ++#include + #ifdef DNETCONN + #include + #include +@@ -257,6 +258,9 @@ static int _xcb_open_tcp(char *host, char *protocol, const unsigned short port) + { + fd = socket(addr->ai_family, addr->ai_socktype, addr->ai_protocol); + if(fd >= 0) { ++ int on = 1; ++ setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, &on, sizeof(on)); ++ + if (connect(fd, addr->ai_addr, addr->ai_addrlen) >= 0) + break; + close(fd); diff --git a/libxcb.spec b/libxcb.spec index 19ef8b5..3510251 100644 --- a/libxcb.spec +++ b/libxcb.spec @@ -4,7 +4,7 @@ Name: libxcb Version: 1.2 -Release: 4%{?dist} +Release: 5%{?dist} Summary: A C binding to the X11 protocol Group: System Environment/Libraries @@ -21,6 +21,7 @@ Source2: http://xcb.freedesktop.org/dist/xpyb-%{xpyb_version}.tar.bz2 Patch0: libxcb-1.1-no-pthread-stubs.patch Patch1: libxcb-1.2-to-git-6e2e87d.patch +Patch2: libxcb-1.2-no-nagle.patch BuildRequires: autoconf automake libtool pkgconfig BuildRequires: doxygen @@ -67,6 +68,7 @@ Python bindings for %{name}. %setup -q -b2 %patch0 -p1 -b .pthread-stubs %patch1 -p1 -b .git +%patch2 -p1 -b .no-nagle %build autoreconf -v --install @@ -116,6 +118,9 @@ rm -rf $RPM_BUILD_ROOT %{python_sitearch}/xcb %changelog +* Wed Jun 24 2009 Adam Jackson 1.2-5 +- libxcb-1.2-no-nagle.patch: Disable Nagle's algorithm on TCP. (#442158) + * Tue May 19 2009 Adam Jackson 1.2-4 - Add libxcb-python subpackage