diff options
| -rw-r--r-- | meta/recipes-connectivity/avahi/avahi.inc | 1 | ||||
| -rw-r--r-- | meta/recipes-connectivity/avahi/files/reuseport-check.patch | 30 |
2 files changed, 31 insertions, 0 deletions
diff --git a/meta/recipes-connectivity/avahi/avahi.inc b/meta/recipes-connectivity/avahi/avahi.inc index 3a95b7fa1f..e4ff26a17c 100644 --- a/meta/recipes-connectivity/avahi/avahi.inc +++ b/meta/recipes-connectivity/avahi/avahi.inc | |||
| @@ -26,6 +26,7 @@ SRC_URI = "http://avahi.org/download/avahi-${PV}.tar.gz \ | |||
| 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://0001-avahi-fix-avahi-status-command-error-prompt.patch \ | 28 | file://0001-avahi-fix-avahi-status-command-error-prompt.patch \ |
| 29 | file://reuseport-check.patch \ | ||
| 29 | " | 30 | " |
| 30 | 31 | ||
| 31 | USERADD_PACKAGES = "avahi-daemon avahi-autoipd" | 32 | USERADD_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 @@ | |||
| 1 | Fix avahi-daemon when running on kernel < 3.9 (patch taken from Ubuntu). | ||
| 2 | |||
| 3 | Upstream-Status: Pending (unmaintained upstream) | ||
| 4 | Signed-off-by: Ross Burton <ross.burton@intel.com> | ||
| 5 | |||
| 6 | Description: 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. | ||
| 15 | Author: Andy Whitcroft <apw@canonical.com> | ||
| 16 | |||
| 17 | Index: 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 | |||
