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;
