--- libeio/eio.c 2011/07/05 20:34:42 1.81 +++ libeio/eio.c 2011/07/07 15:44:44 1.82 @@ -987,6 +987,9 @@ 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 @@ 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);