Gentoo Archives: gentoo-commits

From: "Mike Frysinger (vapier)" <vapier@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in net-dns/avahi/files: avahi-0.6.31-so_reuseport-may-not-exist-in-running-kernel.patch
Date: Sun, 09 Feb 2014 00:48:10
Message-Id: 20140209004803.6A2132004E@flycatcher.gentoo.org
1 vapier 14/02/09 00:48:03
2
3 Added:
4 avahi-0.6.31-so_reuseport-may-not-exist-in-running-kernel.patch
5 Log:
6 Add patch from Debian to fix running on older kernels w/newer kernel headers #484212 by Fab.
7
8 (Portage version: 2.2.8-r1/cvs/Linux x86_64, signed Manifest commit with key D2E96200)
9
10 Revision Changes Path
11 1.1 net-dns/avahi/files/avahi-0.6.31-so_reuseport-may-not-exist-in-running-kernel.patch
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-dns/avahi/files/avahi-0.6.31-so_reuseport-may-not-exist-in-running-kernel.patch?rev=1.1&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-dns/avahi/files/avahi-0.6.31-so_reuseport-may-not-exist-in-running-kernel.patch?rev=1.1&content-type=text/plain
15
16 Index: avahi-0.6.31-so_reuseport-may-not-exist-in-running-kernel.patch
17 ===================================================================
18 https://bugs.gentoo.org/484212
19
20 Description: SO_REUSEPORT may not exist in running kernel
21 When userspace defines SO_REUSEPORT we will attempt to enable socket
22 port number reuse. However if the running kernel does not support
23 this call it will fail preventing daemon startup. If this call is
24 present but fails ENOPROTOOPT then we know that actually the kernel
25 does not support it and we should continue as if we did not have the
26 call at all. (LP: #1228204)
27 .
28 This patch could be removed from the debian package after jessie release.
29 Author: Andy Whitcroft <apw@×××××××××.com>
30 Bug-Ubuntu: https://bugs.launchpad.net/bugs/1228204
31 Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=732009
32 Last-Update: 2013-09-20
33
34 Index: avahi-0.6.31/avahi-core/socket.c
35 ===================================================================
36 --- avahi-0.6.31.orig/avahi-core/socket.c 2013-09-20 16:36:50.000000000 +0100
37 +++ avahi-0.6.31/avahi-core/socket.c 2013-09-20 16:38:23.781863644 +0100
38 @@ -177,7 +177,8 @@
39 yes = 1;
40 if (setsockopt(fd, SOL_SOCKET, SO_REUSEPORT, &yes, sizeof(yes)) < 0) {
41 avahi_log_warn("SO_REUSEPORT failed: %s", strerror(errno));
42 - return -1;
43 + if (errno != ENOPROTOOPT)
44 + return -1;
45 }
46 #endif