return nixio__perror(L);
}
- lua_pushnumber(L, spliced);
+ lua_pushinteger(L, spliced);
return 1;
}
const off_t offset = lseek(infd, 0, SEEK_CUR);
do {
+#ifdef __DARWIN__
+ r = sendfile(infd, sock, offset, (off_t *)&len, NULL, 0);
+ spliced = r;
+#else
r = sendfile(infd, sock, offset, len, NULL, &spliced, 0);
+#endif
} while (r == -1 && errno == EINTR);
if (r == -1) {
}
#endif
- lua_pushnumber(L, spliced);
+ lua_pushinteger(L, spliced);
return 1;
}