summaryrefslogtreecommitdiffstats
path: root/meta/recipes-connectivity/avahi/files/reuseport-check.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-connectivity/avahi/files/reuseport-check.patch')
-rw-r--r--meta/recipes-connectivity/avahi/files/reuseport-check.patch30
1 files changed, 30 insertions, 0 deletions
diff --git a/meta/recipes-connectivity/avahi/files/reuseport-check.patch b/meta/recipes-connectivity/avahi/files/reuseport-check.patch
new file mode 100644
index 0000000000..bb81c2cb4e
--- /dev/null
+++ b/meta/recipes-connectivity/avahi/files/reuseport-check.patch
@@ -0,0 +1,30 @@
1Fix avahi-daemon when running on kernel < 3.9 (patch taken from Ubuntu).
2
3Upstream-Status: Pending (unmaintained upstream)
4Signed-off-by: Ross Burton <ross.burton@intel.com>
5
6Description: SO_REUSEPORT may not exist in running kernel
7 When userspace defines SO_REUSEPORT we will attempt to enable socket
8 port number reuse. However if the running kernel does not support
9 this call it will fail preventing daemon startup. If this call is
10 present but fails ENOPROTOOPT then we know that actually the kernel
11 does not support it and we should continue as if we did not have the
12 call at all. (LP: #1228204)
13 .
14 This patch could be removed from the debian package after jessie release.
15Author: Andy Whitcroft <apw@canonical.com>
16
17Index: avahi-0.6.31/avahi-core/socket.c
18===================================================================
19--- avahi-0.6.31.orig/avahi-core/socket.c 2013-09-20 16:36:50.000000000 +0100
20+++ avahi-0.6.31/avahi-core/socket.c 2013-09-20 16:38:23.781863644 +0100
21@@ -177,7 +177,8 @@
22 yes = 1;
23 if (setsockopt(fd, SOL_SOCKET, SO_REUSEPORT, &yes, sizeof(yes)) < 0) {
24 avahi_log_warn("SO_REUSEPORT failed: %s", strerror(errno));
25- return -1;
26+ if (errno != ENOPROTOOPT)
27+ return -1;
28 }
29 #endif
30