summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorroot <root>2011-07-07 15:44:44 +0000
committerroot <root>2011-07-07 15:44:44 +0000
commitd1b1bb8c317630566c3996de8a1dc18d5b43b908 (patch)
tree22587f7f38dcab284814caff5438884f49db3089
parent9ec5a0945ff19e73cf8953060270c9d558be0847 (diff)
fix sendfile on darwin differently
-rw-r--r--eio.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/eio.c b/eio.c
index 249ecea..2a42802 100644
--- a/eio.c
+++ b/eio.c
@@ -987,6 +987,9 @@ eio__sendfile (int ofd, int ifd, off_t offset, size_t count, etp_worker *self)
for (;;)
{
+#ifdef __APPLE__
+# undef HAVE_SENDFILE /* broken, as everything on os x */
+#endif
#if HAVE_SENDFILE
# if __linux
off_t soffset = offset;
@@ -1012,7 +1015,7 @@ eio__sendfile (int ofd, int ifd, off_t offset, size_t count, etp_worker *self)
if (sbytes)
res = sbytes;
-# elif defined (__APPLE__) && 0 /* broken, as everything on os x */
+# elif defined (__APPLE__)
off_t sbytes = count;
res = sendfile (ifd, ofd, offset, &sbytes, 0, 0);