X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=src%2Fwrapper%2Fsplice.c;h=51b9673fd606fc1da089936ae7c04c0254ab4802;hb=d1fea60895526d461646b2918eb53bed2f40b6eb;hp=33e3aaa53b9bb08fdd5857f16819e6775085e0ed;hpb=cfa6cc1d0f01c2cfcc1a679abf3a6572d411c309;p=lttng-modules.git diff --git a/src/wrapper/splice.c b/src/wrapper/splice.c index 33e3aaa5..51b9673f 100644 --- a/src/wrapper/splice.c +++ b/src/wrapper/splice.c @@ -11,8 +11,7 @@ #include -#if (defined(CONFIG_KALLSYMS) \ - && (LINUX_VERSION_CODE < KERNEL_VERSION(4,2,0))) +#ifdef CONFIG_KALLSYMS #include #include @@ -36,6 +35,21 @@ ssize_t wrapper_splice_to_pipe(struct pipe_inode_info *pipe, } } +/* + * Canary function to check for 'splice_to_pipe()' at compile time. + * + * From 'include/linux/splice.h': + * + * extern ssize_t splice_to_pipe(struct pipe_inode_info *, + * struct splice_pipe_desc *spd); + */ +__attribute__((unused)) static +ssize_t __canary__splice_to_pipe(struct pipe_inode_info *pipe, + struct splice_pipe_desc *spd) +{ + return splice_to_pipe(pipe, spd); +} + #else #include