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 <jens.axboe@oracle.com>
#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 */
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))