Compile out splice support from socket when the splice-family of syscalls is not supported by the system (i.e. CONFIG_SYSCALL_SPLICE is undefined).
Signed-off-by: Pieter Smith <pie...@boesman.nl> --- net/socket.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/net/socket.c b/net/socket.c index 95ee7d8..5cb347a 100644 --- a/net/socket.c +++ b/net/socket.c @@ -155,8 +155,8 @@ static const struct file_operations socket_file_ops = { .release = sock_close, .fasync = sock_fasync, .sendpage = sock_sendpage, - .splice_write = generic_splice_sendpage, - .splice_read = sock_splice_read, + SPLICE_WRITE_INIT(generic_splice_sendpage) + SPLICE_READ_INIT(sock_splice_read) }; /* @@ -881,7 +881,8 @@ static ssize_t sock_sendpage(struct file *file, struct page *page, return kernel_sendpage(sock, page, offset, size, flags); } -static ssize_t sock_splice_read(struct file *file, loff_t *ppos, +static ssize_t __maybe_unused sock_splice_read( + struct file *file, loff_t *ppos, struct pipe_inode_info *pipe, size_t len, unsigned int flags) { -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/