From 68823ffd3a76f88ad34c3d0d9f6fdf1ada0eae43 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Holger=20Hoffst=C3=A4tte?= <holger@applied-asynchrony.com>
Date: Thu, 5 Jan 2017 15:34:46 +0100
Subject: [PATCH] Ifdef __access_remote_vm since the function was made publicly
 accessible (#711)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

since kernel >=4.9.1. Fixes #710.

sysdig-CLA-1.0-signed-off-by: Holger Hoffstätte <holger@applied-asynchrony.com>
---
 driver/main.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/driver/main.c b/driver/main.c
index c274b8f..fa0d3a2 100644
--- a/driver/main.c
+++ b/driver/main.c
@@ -1737,8 +1737,10 @@ TRACEPOINT_PROBE(syscall_exit_probe, struct pt_regs *regs, long ret)
 	}
 }
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 1)
 int __access_remote_vm(struct task_struct *t, struct mm_struct *mm, unsigned long addr,
 		       void *buf, int len, int write);
+#endif
 
 TRACEPOINT_PROBE(syscall_procexit_probe, struct task_struct *p)
 {
