summaryrefslogtreecommitdiffhomepage
path: root/libs/nixio/src
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2009-12-28 22:03:42 +0000
committerJo-Philipp Wich <jow@openwrt.org>2009-12-28 22:03:42 +0000
commit6ffdb72a4df3c06f56d594fdd56cce69c1ef664c (patch)
tree599e8a62dd295888ba7c12ff9f334b0f9550a65b /libs/nixio/src
parent0ddedc638cc78d3e073ebb2dc6f31c2e12e0d247 (diff)
libs/nixio: fix compile on OS X
Diffstat (limited to 'libs/nixio/src')
-rw-r--r--libs/nixio/src/splice.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libs/nixio/src/splice.c b/libs/nixio/src/splice.c
index 8b4f2a1ac..4f7c04301 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) {