1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-02 06:03:50 +00:00

- Add optional TCP_NODELAY patch

PR:		ports/145985
Approved by:	maintainer (timeout)
This commit is contained in:
Martin Matuska 2010-05-21 07:49:36 +00:00
parent 00f8f89f30
commit 00d62cdc46
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=254699
2 changed files with 21 additions and 0 deletions

View File

@ -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

View File

@ -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