1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-05 06:27:37 +00:00

Fix runtime problem when lighttpd is built with IPV6 option turned

on.

PR:		223288
Submitted by:	Piotr Kubaj <pkubaj@anongoth.pl> (maintainer)
Obtained from:	https://redmine.lighttpd.net/issues/2832
This commit is contained in:
Guido Falsi 2017-10-28 16:00:56 +00:00
parent b4e540bdcd
commit 6c52cfec3b
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=453061
2 changed files with 20 additions and 0 deletions

View File

@ -3,6 +3,7 @@
PORTNAME?= lighttpd
PORTVERSION= 1.4.47
PORTREVISION= 1
CATEGORIES?= www
MASTER_SITES?= http://download.lighttpd.net/lighttpd/releases-1.4.x/

View File

@ -0,0 +1,19 @@
--- patch-src_network.c.orig 2017-10-28 15:54:22 UTC
+++ patch-src_network.c
@@ -0,0 +1,16 @@
+--- src/network.c.orig 2017-10-28 14:00:17 UTC
++++ src/network.c
+@@ -77,9 +77,13 @@ static void network_host_normalize_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);
++#elif
++ unsigned short port = ntohs(addr->ipv6.sin6_port);
++#endif
+ buffer_append_string_len(host, CONST_STR_LEN(":"));
+ buffer_append_int(host, (int)port);
+ }