[PATCH] samples/bpf: Fix cross compiler error with bpf sample

From: Joel Fernandes
Date: Fri Aug 04 2017 - 01:46:42 EST


When cross-compiling the bpf sample map_perf_test for aarch64, I find that
__NR_getpgrp is undefined. This causes build errors. Fix it by allowing the
deprecated syscall in the sample.

Signed-off-by: Joel Fernandes <joelaf@xxxxxxxxxx>
---
samples/bpf/map_perf_test_user.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/samples/bpf/map_perf_test_user.c b/samples/bpf/map_perf_test_user.c
index 1a8894b5ac51..6e6fc7121640 100644
--- a/samples/bpf/map_perf_test_user.c
+++ b/samples/bpf/map_perf_test_user.c
@@ -8,7 +8,9 @@
#include <sched.h>
#include <stdio.h>
#include <sys/types.h>
+#define __ARCH_WANT_SYSCALL_DEPRECATED
#include <asm/unistd.h>
+#undef __ARCH_WANT_SYSCALL_DEPRECATED
#include <unistd.h>
#include <assert.h>
#include <sys/wait.h>
--
2.14.0.rc1.383.gd1ce394fe2-goog