[Ocfs2-test-devel] [PATCH] splice: modify type of splice() of splice_test.h to ssize_t
Coly Li
coly.li at suse.de
Mon Apr 13 00:03:07 PDT 2009
Current return value type of splice() of splice_test.h is int, which conflict
with declaration of splice(2) in bits/fcntl.h. The conflict results compiling
failure on several distributions (e.g. openSuSE 11.1).
This patch modifies the return value type from int to ssize_t, which fixes the
compiling failure. Thanks to Trinstan who kindly gave me enlightenment on the
fix :-)
Signed-off-by: Coly Li <coly.li at suse.de>
Cc: Tristan Ye <tristan.ye at oracle.com>
---
programs/splice/splice_test.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/programs/splice/splice_test.h b/programs/splice/splice_test.h
index 5113bbb..daf02a5 100644
--- a/programs/splice/splice_test.h
+++ b/programs/splice/splice_test.h
@@ -31,7 +31,7 @@
#error unsupported arch
#endif
-int splice(int fdin, loff_t *off_in, int fdout,
+ssize_t splice(int fdin, loff_t *off_in, int fdout,
loff_t *off_out, size_t len, unsigned int flags)
{
return syscall(__NR_splice, fdin, off_in, fdout, off_out, len, flags);
--
Coly Li
SuSE Labs
More information about the Ocfs2-test-devel
mailing list