Modified: trunk/dports/www/varnish/Portfile (31703 => 31704)
--- 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 (0 => 31704)
--- 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;