Detect missing symbols used with kallsyms_lookup at compile time
[lttng-modules.git] / wrapper / splice.c
index 2ecc98f38bf706eea4ef476fc99c7b4ae85ae85e..282bd863e2cb849ec57ec4336c43539d7a495858 100644 (file)
@@ -36,6 +36,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 <linux/fs.h>
This page took 0.023422 seconds and 4 git commands to generate.