summaryrefslogtreecommitdiffhomepage
path: root/libs/nixio/src
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2009-02-22 23:37:35 +0000
committerSteven Barth <steven@midlink.org>2009-02-22 23:37:35 +0000
commit06450d3fe3b5248276e3113a358954ee85af5779 (patch)
treeb19c00acb700e47b16cfbbd6f77aa8052804c20a /libs/nixio/src
parentd730c1263328c5990ce46cdf6394ce6e36cc3609 (diff)
Remove some crap
Add compatiblity for older uclibc versions
Diffstat (limited to 'libs/nixio/src')
-rw-r--r--libs/nixio/src/splice.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/libs/nixio/src/splice.c b/libs/nixio/src/splice.c
index 2b2837060..538b99e69 100644
--- a/libs/nixio/src/splice.c
+++ b/libs/nixio/src/splice.c
@@ -25,10 +25,22 @@
/* guess what sucks... */
#ifdef __UCLIBC__
#include <unistd.h>
+#include <errno.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
return syscall(__NR_splice, __fdin, __offin, __fdout, __offout, __len, __flags);
+#else
+ (void)__fdin;
+ (void)__offin;
+ (void)__fdout;
+ (void)__offout;
+ (void)__len;
+ (void)__flags;
+ errno = ENOSYS;
+ return -1;
+#endif
}
#endif /* __UCLIBC__ */