libs/nixio: properly cast len argument for OS X sendfile()
authorJo-Philipp Wich <jow@openwrt.org>
Mon, 28 Dec 2009 23:07:04 +0000 (23:07 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Mon, 28 Dec 2009 23:07:04 +0000 (23:07 +0000)
libs/nixio/src/splice.c

index 4f7c04301c67e53ed466946735556ed6196f67e3..38a45c22abc5cbbb6228ceae5e4684b4de0ef43d 100644 (file)
@@ -144,7 +144,7 @@ static int nixio_sendfile(lua_State *L) {
 
        do {
 #ifdef __DARWIN__
-               r = sendfile(infd, sock, offset, len, NULL, 0);
+               r = sendfile(infd, sock, offset, (off_t *)&len, NULL, 0);
 #else
                r = sendfile(infd, sock, offset, len, NULL, &spliced, 0);
 #endif