Kernel 3.15 don't define map unmap for pipe
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 14 Apr 2014 02:26:17 +0000 (22:26 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 15 Apr 2014 15:33:01 +0000 (11:33 -0400)
struct pipe_buf_operations does not have map and unmap fields starting
from kernel 3.15.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
lib/ringbuffer/ring_buffer_splice.c

index 3a7ff0c45cf86f7606d9d0751fe7a5db283daf3b..bb91f45e01a303303b514814436d388ed9292c23 100644 (file)
@@ -25,6 +25,7 @@
 
 #include <linux/module.h>
 #include <linux/fs.h>
+#include <linux/version.h>
 
 #include "../../wrapper/splice.h"
 #include "../../wrapper/ringbuffer/backend.h"
@@ -56,8 +57,10 @@ static void lib_ring_buffer_pipe_buf_release(struct pipe_inode_info *pipe,
 
 static const struct pipe_buf_operations ring_buffer_pipe_buf_ops = {
        .can_merge = 0,
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,15,0))
        .map = generic_pipe_buf_map,
        .unmap = generic_pipe_buf_unmap,
+#endif
        .confirm = generic_pipe_buf_confirm,
        .release = lib_ring_buffer_pipe_buf_release,
        .steal = generic_pipe_buf_steal,
This page took 0.026422 seconds and 4 git commands to generate.