Message ID | 20220208051635.2160304-3-iii@linux.ibm.com (mailing list archive) |
---|---|
State | Superseded |
Delegated to: | BPF |
Headers | show |
Series | Fix accessing syscall arguments | expand |
diff --git a/tools/testing/selftests/bpf/progs/test_cls_redirect.c b/tools/testing/selftests/bpf/progs/test_cls_redirect.c index 2833ad722cb7..ed1b9c90a66b 100644 --- a/tools/testing/selftests/bpf/progs/test_cls_redirect.c +++ b/tools/testing/selftests/bpf/progs/test_cls_redirect.c @@ -28,8 +28,10 @@ #define INLINING __always_inline #endif +#ifndef offsetofend #define offsetofend(TYPE, MEMBER) \ (offsetof(TYPE, MEMBER) + sizeof((((TYPE *)0)->MEMBER))) +#endif #define IP_OFFSET_MASK (0x1FFF) #define IP_MF (0x2000)
If one of the included headers defines offsetofend macro, test_cls_redirect would fail to build. Wrap the offsetofend definition in #ifdef to avoid that. Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com> --- tools/testing/selftests/bpf/progs/test_cls_redirect.c | 2 ++ 1 file changed, 2 insertions(+)