aboutsummaryrefslogtreecommitdiffstats
path: root/www/lighttpd
diff options
context:
space:
mode:
authormm <mm@FreeBSD.org>2010-05-21 15:49:36 +0800
committermm <mm@FreeBSD.org>2010-05-21 15:49:36 +0800
commitcd9f786203b5286d195d47051d6ea524562d97af (patch)
tree5ff5d1fad6aaeb4f089c0014ef7397a082178d11 /www/lighttpd
parentc1270c72aa78e72fd7e03bc66c9ed2c33196f4a5 (diff)
downloadfreebsd-ports-gnome-cd9f786203b5286d195d47051d6ea524562d97af.tar.gz
freebsd-ports-gnome-cd9f786203b5286d195d47051d6ea524562d97af.tar.zst
freebsd-ports-gnome-cd9f786203b5286d195d47051d6ea524562d97af.zip
- Add optional TCP_NODELAY patch
PR: ports/145985 Approved by: maintainer (timeout)
Diffstat (limited to 'www/lighttpd')
-rw-r--r--www/lighttpd/Makefile6
-rw-r--r--www/lighttpd/files/extra-patch-nodelay15
2 files changed, 21 insertions, 0 deletions
diff --git a/www/lighttpd/Makefile b/www/lighttpd/Makefile
index 324c101faf8a..00fe256e8853 100644
--- a/www/lighttpd/Makefile
+++ b/www/lighttpd/Makefile
@@ -7,6 +7,7 @@
PORTNAME= lighttpd
PORTVERSION= 1.4.26
+PORTREVISION= 1
CATEGORIES= www
MASTER_SITES= http://download.lighttpd.net/lighttpd/releases-1.4.x/
@@ -35,6 +36,7 @@ OPTIONS= BZIP2 "Enable Bzip2 support" off \
MAGNET "Enable magnet support" off \
MEMCACHE "Enable memory caching support" off \
MYSQL "Enable MYSQL support" off \
+ NODELAY "Set TCP_NODELAY on listening sockets" off \
OPENLDAP "Enable LDAP support" off \
OPENSSL "Enable SSL support" on \
SPAWNFCGI "Enable spawn-fcgi utility" on \
@@ -95,6 +97,10 @@ CONFIGURE_ARGS+= --with-mysql
_REQUIRE+= mysql
.endif
+.if defined(WITH_NODELAY)
+EXTRA_PATCHES+= ${FILESDIR}/extra-patch-nodelay
+.endif
+
.if defined(WITH_OPENLDAP)
USE_OPENLDAP= yes
CONFIGURE_ARGS+= --with-ldap
diff --git a/www/lighttpd/files/extra-patch-nodelay b/www/lighttpd/files/extra-patch-nodelay
new file mode 100644
index 000000000000..72fe94b97863
--- /dev/null
+++ b/www/lighttpd/files/extra-patch-nodelay
@@ -0,0 +1,15 @@
+--- src/network.c.orig Tue Jan 26 14:33:01 2010
++++ src/network.c Tue Jan 26 14:37:39 2010
+@@ -226,6 +226,12 @@
+ log_error_write(srv, __FILE__, __LINE__, "ss", "socketsockopt failed:", strerror(errno));
+ goto error_free_socket;
+ }
++ if(srv_socket->addr.plain.sa_family == AF_INET || srv_socket->addr.plain.sa_family == AF_INET6 ) {
++ if (setsockopt(srv_socket->fd, IPPROTO_TCP, TCP_NODELAY, &val, sizeof(val)) < 0) {
++ log_error_write(srv, __FILE__, __LINE__, "ss", "socketsockopt failed:", strerror(errno));
++ goto error_free_socket;
++ }
++ }
+
+ switch(srv_socket->addr.plain.sa_family) {
+ #ifdef HAVE_IPV6