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 4f7c043..38a45c2 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