diff options
author | Jose E. Marchesi <[email protected]> | 2024-05-08 13:03:32 +0200 |
---|---|---|
committer | Alexei Starovoitov <[email protected]> | 2024-05-08 09:56:59 -0700 |
commit | 911edc69c832161b62a8ad10a6972290157a7bd3 (patch) | |
tree | 6cb2526411487c32f0356fe940e1d96e1ab69187 | |
parent | 1209a523f6914404e8941d9e04caa42be7cab8d5 (diff) |
bpf: guard BPF_NO_PRESERVE_ACCESS_INDEX in skb_pkt_end.c
This little patch is a follow-up to:
https://lore.kernel.org/bpf/[email protected]/T/#u
The temporary workaround of passing -DBPF_NO_PRESERVE_ACCESS_INDEX
when building with GCC triggers a redefinition preprocessor error when
building progs/skb_pkt_end.c. This patch adds a guard to avoid
redefinition.
Signed-off-by: Jose E. Marchesi <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: Eduard Zingerman <[email protected]>
Cc: Yonghong Song <[email protected]>
Cc: Andrii Nakryiko <[email protected]>
Acked-by: Yonghong Song <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Alexei Starovoitov <[email protected]>
-rw-r--r-- | tools/testing/selftests/bpf/progs/skb_pkt_end.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/testing/selftests/bpf/progs/skb_pkt_end.c b/tools/testing/selftests/bpf/progs/skb_pkt_end.c index 992b7861003a..db4abd2682fc 100644 --- a/tools/testing/selftests/bpf/progs/skb_pkt_end.c +++ b/tools/testing/selftests/bpf/progs/skb_pkt_end.c @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0 +#ifndef BPF_NO_PRESERVE_ACCESS_INDEX #define BPF_NO_PRESERVE_ACCESS_INDEX +#endif #include <vmlinux.h> #include <bpf/bpf_core_read.h> #include <bpf/bpf_helpers.h> |