projects
/
oweals
/
luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
2c46f10
)
libs/nixio: protect splice calls with ifdef SPLICE_F_MOVE, fixes compile error with...
author
Jo-Philipp Wich
<jow@openwrt.org>
Thu, 27 Aug 2009 01:23:08 +0000
(
01:23
+0000)
committer
Jo-Philipp Wich
<jow@openwrt.org>
Thu, 27 Aug 2009 01:23:08 +0000
(
01:23
+0000)
libs/nixio/src/splice.c
patch
|
blob
|
history
diff --git
a/libs/nixio/src/splice.c
b/libs/nixio/src/splice.c
index 0704dfd24fe27885436c409953e6b6eb115d3c78..fe56661632631dc74878669592a29d2ed4530a7e 100644
(file)
--- a/
libs/nixio/src/splice.c
+++ b/
libs/nixio/src/splice.c
@@
-39,11
+39,13
@@
#endif
#ifdef _GNU_SOURCE
#endif
#ifdef _GNU_SOURCE
+#ifdef SPLICE_F_MOVE
/* guess what sucks... */
#ifdef __UCLIBC__
#include <unistd.h>
#include <sys/syscall.h>
/* 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
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;
}
return 1;
}
+#endif /* SPLICE_F_MOVE */
#endif /* _GNU_SOURCE */
/**
#endif /* _GNU_SOURCE */
/**
@@
-155,8
+158,10
@@
static int nixio_sendfile(lua_State *L) {
/* module table */
static const luaL_reg R[] = {
#ifdef _GNU_SOURCE
/* module table */
static const luaL_reg R[] = {
#ifdef _GNU_SOURCE
+#ifdef SPLICE_F_MOVE
{"splice", nixio_splice},
{"splice_flags", nixio_splice_flags},
{"splice", nixio_splice},
{"splice_flags", nixio_splice_flags},
+#endif
#endif
{"sendfile", nixio_sendfile},
{NULL, NULL}
#endif
{"sendfile", nixio_sendfile},
{NULL, NULL}