netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] samples/bpf: Fix cross compiler error with bpf sample
@ 2017-08-04  5:46 Joel Fernandes
  2017-08-04 13:58 ` Daniel Borkmann
  0 siblings, 1 reply; 5+ messages in thread
From: Joel Fernandes @ 2017-08-04  5:46 UTC (permalink / raw)
  To: linux-kernel
  Cc: Joel Fernandes, Alexei Starovoitov, Daniel Borkmann,
	open list:BPF (Safe dynamic programs and tools)

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@google.com>
---
 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

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-08-05 18:53 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-04  5:46 [PATCH] samples/bpf: Fix cross compiler error with bpf sample Joel Fernandes
2017-08-04 13:58 ` Daniel Borkmann
2017-08-04 18:33   ` Joel Fernandes
2017-08-04 18:44     ` Daniel Borkmann
2017-08-05 18:53       ` Joel Fernandes

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).