diff options
Diffstat (limited to 'libs/nixio/src')
-rw-r--r-- | libs/nixio/src/splice.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libs/nixio/src/splice.c b/libs/nixio/src/splice.c index 8b4f2a1ac0..4f7c04301c 100644 --- a/libs/nixio/src/splice.c +++ b/libs/nixio/src/splice.c @@ -143,7 +143,11 @@ static int nixio_sendfile(lua_State *L) { const off_t offset = lseek(infd, 0, SEEK_CUR); do { +#ifdef __DARWIN__ + r = sendfile(infd, sock, offset, len, NULL, 0); +#else r = sendfile(infd, sock, offset, len, NULL, &spliced, 0); +#endif } while (r == -1 && errno == EINTR); if (r == -1) { |