[Ocfs2-test-devel] [PATCH 17/59] Splice: Fix conflict definition of splice(2) for splice tests.
Eric Ren
zren at suse.com
Mon Sep 21 00:09:42 PDT 2015
Hi,
This issue has been fixed by patch "Remove splice() from api-compat"
from Goldwyn.
Thanks,
Eric Ren
On Mon, Sep 14, 2015 at 10:44:03AM +0800, Junxiao Bi wrote:
> From: Jeff Liu <jeff.liu at oracle.com>
>
> Signed-off-by: Jie Liu <jeff.liu at oracle.com>
> Signed-off-by: Junxiao Bi <junxiao.bi at oracle.com>
> ---
> api-compat/include/splice.h | 47 ++++++++++++++++++-------------------------
> 1 file changed, 20 insertions(+), 27 deletions(-)
>
> diff --git a/api-compat/include/splice.h b/api-compat/include/splice.h
> index 08966c1..c7b8c4d 100644
> --- a/api-compat/include/splice.h
> +++ b/api-compat/include/splice.h
> @@ -3,35 +3,28 @@
>
> #include <unistd.h>
> #include <fcntl.h>
> -
> -#if defined(__i386__)
> -
> -#define __NR_splice 313
> -
> -#elif defined(__x86_64__)
> -
> -#define __NR_splice 275
> -
> -#elif defined(__powerpc__)
> -
> -#define __NR_splice 283
> -
> -#elif defined(__s390__)
> -
> -#define __NR_splice 306
> -
> -#elif defined(__ia64__)
> -
> -#define __NR_splice 1297
> -
> -#else
> -#error unsupported arch
> -#endif
> -
> -int splice(int fdin, loff_t *off_in, int fdout,
> - loff_t *off_out, size_t len, unsigned int flags)
> +#include <sys/syscall.h>
> +
> +# ifndef __NR_splice
> +# if defined(__i386__)
> +# define __NR_splice 313
> +# elif defined(__x86_64__)
> +# define __NR_splice 275
> +# elif defined(__powerpc__)
> +# define __NR_splice 283
> +# elif defined(__s390__)
> +# define __NR_splice 306
> +# elif defined(__ia64__)
> +# define __NR_splice 1297
> +# else
> +# error unsupported arch
> +# endif
> +
> +int 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);
> }
> +# endif
>
> #endif
> --
> 1.7.9.5
>
>
> _______________________________________________
> Ocfs2-test-devel mailing list
> Ocfs2-test-devel at oss.oracle.com
> https://oss.oracle.com/mailman/listinfo/ocfs2-test-devel
>
More information about the Ocfs2-test-devel
mailing list