summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2014-03-11 12:57:04 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-03-11 07:56:39 -0700
commitec578fa12d38ff4ae8bc29e8c47016d6265fe97a (patch)
tree85f78b7b3ba314b543c0cad734984b16747ec812 /meta
parent9e89b4eec43cebddf5016a93f19a9d4f74fa114d (diff)
downloadpoky-ec578fa12d38ff4ae8bc29e8c47016d6265fe97a.tar.gz
avahi: handle SO_REUSEPORT not being available
Linux < 3.9 doesn't have the SO_REUSEPORT option so instead of failing to start when built with >=3.9 kernel headers but booted on <3.9 kernels, continue as if SO_REUSEPORT wasn't available. (From OE-Core rev: 85e89da55f778ad3713460cb0df1435d82e94510) (From OE-Core rev: 704361888958ec790aa2855e22df2d2d87a5d982) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-connectivity/avahi/avahi.inc1
-rw-r--r--meta/recipes-connectivity/avahi/files/reuseport-check.patch30
2 files changed, 31 insertions, 0 deletions
diff --git a/meta/recipes-connectivity/avahi/avahi.inc b/meta/recipes-connectivity/avahi/avahi.inc
index 7e4baecafe..9c9f540c5d 100644
--- a/meta/recipes-connectivity/avahi/avahi.inc
+++ b/meta/recipes-connectivity/avahi/avahi.inc
@@ -25,6 +25,7 @@ SRC_URI = "http://avahi.org/download/avahi-${PV}.tar.gz \
25 file://avahi_fix_install_issue.patch \ 25 file://avahi_fix_install_issue.patch \
26 file://fix_for_automake_1.12.x.patch \ 26 file://fix_for_automake_1.12.x.patch \
27 file://out-of-tree.patch \ 27 file://out-of-tree.patch \
28 file://reuseport-check.patch \
28 " 29 "
29 30
30USERADD_PACKAGES = "avahi-daemon avahi-autoipd" 31USERADD_PACKAGES = "avahi-daemon avahi-autoipd"
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