ports/103758: Update port: www/lighttpd fix build on 4.x
Marcus Alves Grando
mnag at FreeBSD.org
Thu Sep 28 14:40:29 UTC 2006
>Number: 103758
>Category: ports
>Synopsis: Update port: www/lighttpd fix build on 4.x
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: update
>Submitter-Id: current-users
>Arrival-Date: Thu Sep 28 14:40:15 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator: Marcus Alves Grando
>Release: FreeBSD 6.2-PRERELEASE i386
>Organization:
Grupos Internet S/A
>Environment:
System: FreeBSD marcus.grupos.com.br 6.2-PRERELEASE FreeBSD 6.2-PRERELEASE #1: Wed Sep 27 11:36:19 BRT 2006 root at marcus.grupos.com.br:/usr/obj/usr/src/sys/MARCUS i386
>Description:
- Fix build on 4.x
>How-To-Repeat:
>Fix:
--- lighttpd.patch begins here ---
Index: files/patch-src__network_writev.c
===================================================================
RCS file: files/patch-src__network_writev.c
diff -N files/patch-src__network_writev.c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ files/patch-src__network_writev.c 26 Sep 2006 13:41:48 -0000
@@ -0,0 +1,25 @@
+#
+# 4.x can't get sysconf(_SC_IOV_MAX) because that's are added in 5.0,
+# take UIO_MAXIOV from sys/uio.h and hardcode this value
+# because UIO_MAXIOV are defined in _KERNEL only.
+#
+--- src/network_writev.c.orig Tue Sep 26 10:28:56 2006
++++ src/network_writev.c Tue Sep 26 10:34:30 2006
+@@ -47,6 +47,9 @@
+ struct iovec *chunks;
+ chunk *tc;
+ size_t num_bytes = 0;
++#if (defined(__FreeBSD__) && __FreeBSD_version < 500000)
++ const size_t max_chunks = 1024; /* UIO_MAXIOV value from sys/uio.h */
++#else
+ #if defined(_SC_IOV_MAX) /* IRIX, MacOS X, FreeBSD, Solaris, ... */
+ const size_t max_chunks = sysconf(_SC_IOV_MAX);
+ #elif defined(IOV_MAX) /* Linux x86 (glibc-2.3.6-3) */
+@@ -57,6 +60,7 @@
+ const size_t max_chunks = UIO_MAXIOV;
+ #else
+ #error "sysconf() doesnt return _SC_IOV_MAX ..., check the output of 'man writev' for the EINVAL error and send the output to jan at kneschke.de"
++#endif
+ #endif
+
+ /* we can't send more then SSIZE_MAX bytes in one chunk */
--- lighttpd.patch ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list