From 5d4d8cbd4e377e186f103f496917ae75d6e9d8ff Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Mon, 5 Feb 2007 15:24:07 +0100 Subject: [PATCH] [PATCH] Fix build with newer glibc/kernel-headers On newer systems (SUSE 10.2 for one), the build fails because the splice functions and flags are available in the normal headers. Signed-off-by: Jens Axboe --- splice.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/splice.h b/splice.h index eb0654c..fdcd915 100644 --- a/splice.h +++ b/splice.h @@ -26,6 +26,8 @@ #error unsupported arch #endif +#ifndef SPLICE_F_MOVE + #define SPLICE_F_MOVE (0x01) /* move pages instead of copying */ #define SPLICE_F_NONBLOCK (0x02) /* don't block on the pipe splicing (but */ /* we may still block on the fd we splice */ @@ -51,6 +53,8 @@ static inline int vmsplice(int fd, const struct iovec *iov, return syscall(__NR_sys_vmsplice, fd, iov, nr_segs, flags); } +#endif /* SPLICE_F_MOVE defined */ + #define SPLICE_SIZE (64*1024) #define BUG_ON(c) assert(!(c)) -- 2.25.1