diff options
author | Daniel Campbell <zlg@gentoo.org> | 2017-11-07 01:38:11 -0800 |
---|---|---|
committer | Daniel Campbell <zlg@gentoo.org> | 2017-11-07 01:47:39 -0800 |
commit | 552b68046ac0ecf4feaf52a77a73f663c379610a (patch) | |
tree | 222e158cc6eabc5dd4fa677fc1ad01566c4cc973 /www-servers | |
parent | sys-fs/udisks: Removed old. (diff) | |
download | gentoo-552b68046ac0ecf4feaf52a77a73f663c379610a.tar.gz gentoo-552b68046ac0ecf4feaf52a77a73f663c379610a.tar.bz2 gentoo-552b68046ac0ecf4feaf52a77a73f663c379610a.zip |
www-servers/lighttpd: correct USE="-ipv6" behavior
Thanks to nicorac & upstream for the patch, to Oschtan for reporting,
and Felix Janda for the lead.
Closes: https://bugs.gentoo.org/636650
Package-Manager: Portage-2.3.13, Repoman-2.3.4
Diffstat (limited to 'www-servers')
-rw-r--r-- | www-servers/lighttpd/files/lighttpd-1.4.47-3d257ec3-respect-HAVE_IPV6.patch | 31 | ||||
-rw-r--r-- | www-servers/lighttpd/lighttpd-1.4.47.ebuild | 4 |
2 files changed, 35 insertions, 0 deletions
diff --git a/www-servers/lighttpd/files/lighttpd-1.4.47-3d257ec3-respect-HAVE_IPV6.patch b/www-servers/lighttpd/files/lighttpd-1.4.47-3d257ec3-respect-HAVE_IPV6.patch new file mode 100644 index 000000000000..7916ac0b53f3 --- /dev/null +++ b/www-servers/lighttpd/files/lighttpd-1.4.47-3d257ec3-respect-HAVE_IPV6.patch @@ -0,0 +1,31 @@ +Backport upstream fixes for Gentoo bug #636650 + +Original upstream commit message: + +Author: nicorac <claudio.nicora@gmail.com> +Date: Wed Oct 25 16:48:24 2017 +0200 + + [core] fix build --disable-ipv6 (fixes #2832) + + x-ref: + "Build error on systems without IPV6 support (regression from 1.4.46)" + https://redmine.lighttpd.net/issues/2832 + + github: closes #87 + +--- a/src/network.c ++++ b/src/network.c +@@ -77,9 +77,13 @@ static void network_host_normalize_addr_str(buffer *host, sock_addr *addr) { + if (addr->plain.sa_family == AF_INET6) + buffer_append_string_len(host, CONST_STR_LEN("]")); + if (addr->plain.sa_family != AF_UNIX) { ++ #ifdef HAVE_IPV6 + unsigned short port = (addr->plain.sa_family == AF_INET) + ? ntohs(addr->ipv4.sin_port) + : ntohs(addr->ipv6.sin6_port); ++ #else ++ unsigned short port = ntohs(addr->ipv4.sin_port); ++ #endif + buffer_append_string_len(host, CONST_STR_LEN(":")); + buffer_append_int(host, (int)port); + } diff --git a/www-servers/lighttpd/lighttpd-1.4.47.ebuild b/www-servers/lighttpd/lighttpd-1.4.47.ebuild index 69a3db322f69..7267b9187d2d 100644 --- a/www-servers/lighttpd/lighttpd-1.4.47.ebuild +++ b/www-servers/lighttpd/lighttpd-1.4.47.ebuild @@ -51,6 +51,10 @@ RDEPEND="${CDEPEND} selinux? ( sec-policy/selinux-apache ) " +PATCHES=( + "${FILESDIR}/${P}-3d257ec3-respect-HAVE_IPV6.patch" +) + # update certain parts of lighttpd.conf based on conditionals update_config() { local config="${D}/etc/lighttpd/lighttpd.conf" |