From: Mathieu Desnoyers Date: Mon, 14 Apr 2014 02:26:17 +0000 (-0400) Subject: Kernel 3.15 don't define map unmap for pipe X-Git-Tag: v2.5.0-rc1~16 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=989f58e80ffdf6fbc3150d14977c2bff411d3b9c;p=lttng-modules.git Kernel 3.15 don't define map unmap for pipe struct pipe_buf_operations does not have map and unmap fields starting from kernel 3.15. Signed-off-by: Mathieu Desnoyers --- diff --git a/lib/ringbuffer/ring_buffer_splice.c b/lib/ringbuffer/ring_buffer_splice.c index 3a7ff0c4..bb91f45e 100644 --- a/lib/ringbuffer/ring_buffer_splice.c +++ b/lib/ringbuffer/ring_buffer_splice.c @@ -25,6 +25,7 @@ #include #include +#include #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,