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@xxxxxxxxxxxxx> --- tools/testing/selftests/bpf/progs/test_cls_redirect.c | 2 ++ 1 file changed, 2 insertions(+) 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) -- 2.34.1