[31704] trunk/dports/www/varnish
pmq at macports.org
pmq at macports.org
Mon Dec 3 11:56:35 PST 2007
Revision: 31704
http://trac.macosforge.org/projects/macports/changeset/31704
Author: pmq at macports.org
Date: 2007-12-03 11:56:32 -0800 (Mon, 03 Dec 2007)
Log Message:
-----------
Fix varnish for darwin9.
Modified Paths:
--------------
trunk/dports/www/varnish/Portfile
Added Paths:
-----------
trunk/dports/www/varnish/files/
trunk/dports/www/varnish/files/patch-sendfile.diff
Modified: trunk/dports/www/varnish/Portfile
===================================================================
--- trunk/dports/www/varnish/Portfile 2007-12-03 18:37:15 UTC (rev 31703)
+++ trunk/dports/www/varnish/Portfile 2007-12-03 19:56:32 UTC (rev 31704)
@@ -16,3 +16,7 @@
checksums sha1 49f9335b30bd6875608039d578056c19b67af565 \
rmd160 a5f54606f9259d61e992dcc37bd05a95f6ce73aa
+
+platform darwin 9 {
+ patchfiles patch-sendfile.diff
+}
Added: trunk/dports/www/varnish/files/patch-sendfile.diff
===================================================================
--- trunk/dports/www/varnish/files/patch-sendfile.diff (rev 0)
+++ trunk/dports/www/varnish/files/patch-sendfile.diff 2007-12-03 19:56:32 UTC (rev 31704)
@@ -0,0 +1,31 @@
+Index: bin/varnishd/cache_pool.c
+===================================================================
+--- bin/varnishd/cache_pool.c (revision 2262)
++++ bin/varnishd/cache_pool.c (working copy)
+@@ -35,7 +35,7 @@
+ #include <sys/uio.h>
+
+ #ifdef HAVE_SENDFILE
+-#if defined(__FreeBSD__)
++#if defined(__FreeBSD__) || defined(__APPLE__)
+ #include <sys/socket.h>
+ #elif defined(__linux__)
+ #include <sys/sendfile.h>
+@@ -151,7 +151,7 @@
+ assert(fd >= 0);
+ assert(len > 0);
+
+-#if defined(__FreeBSD__)
++#if defined(__FreeBSD__) || defined(__APPLE__)
+ do {
+ struct sf_hdtr sfh;
+ memset(&sfh, 0, sizeof sfh);
+@@ -159,7 +159,7 @@
+ sfh.headers = w->iov;
+ sfh.hdr_cnt = w->niov;
+ }
+- if (sendfile(fd, *w->wfd, off, len, &sfh, NULL, 0) != 0)
++ if (sendfile(fd, *w->wfd, off, len, &sfh, 0) != 0)
+ w->werr++;
+ w->liov = 0;
+ w->niov = 0;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20071203/ad2f6552/attachment.html
More information about the macports-changes
mailing list