diff options
-rw-r--r-- | libs/nixio/src/splice.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libs/nixio/src/splice.c b/libs/nixio/src/splice.c index 0704dfd24..fe5666163 100644 --- a/libs/nixio/src/splice.c +++ b/libs/nixio/src/splice.c @@ -39,11 +39,13 @@ #endif #ifdef _GNU_SOURCE +#ifdef SPLICE_F_MOVE /* guess what sucks... */ #ifdef __UCLIBC__ #include <unistd.h> #include <sys/syscall.h> + ssize_t splice(int __fdin, __off64_t *__offin, int __fdout, __off64_t *__offout, size_t __len, unsigned int __flags) { #ifdef __NR_splice @@ -116,6 +118,7 @@ static int nixio_splice_flags(lua_State *L) { return 1; } +#endif /* SPLICE_F_MOVE */ #endif /* _GNU_SOURCE */ /** @@ -155,9 +158,11 @@ static int nixio_sendfile(lua_State *L) { /* module table */ static const luaL_reg R[] = { #ifdef _GNU_SOURCE +#ifdef SPLICE_F_MOVE {"splice", nixio_splice}, {"splice_flags", nixio_splice_flags}, #endif +#endif {"sendfile", nixio_sendfile}, {NULL, NULL} }; |