Ticket #13468: varnish-darwin9.diff
File varnish-darwin9.diff, 843 bytes (added by pmq@…, 17 years ago) |
---|
-
bin/varnishd/cache_pool.c
35 35 #include <sys/uio.h> 36 36 37 37 #ifdef HAVE_SENDFILE 38 #if defined(__FreeBSD__) 38 #if defined(__FreeBSD__) || defined(__APPLE__) 39 39 #include <sys/socket.h> 40 40 #elif defined(__linux__) 41 41 #include <sys/sendfile.h> … … 151 151 assert(fd >= 0); 152 152 assert(len > 0); 153 153 154 #if defined(__FreeBSD__) 154 #if defined(__FreeBSD__) || defined(__APPLE__) 155 155 do { 156 156 struct sf_hdtr sfh; 157 157 memset(&sfh, 0, sizeof sfh); … … 159 159 sfh.headers = w->iov; 160 160 sfh.hdr_cnt = w->niov; 161 161 } 162 if (sendfile(fd, *w->wfd, off, len, &sfh, NULL,0) != 0)162 if (sendfile(fd, *w->wfd, off, len, &sfh, 0) != 0) 163 163 w->werr++; 164 164 w->liov = 0; 165 165 w->niov = 0;