kernel/tools/testing/selftests/bpf/progs/test_cls_redirect.h
.. .. @@ -12,6 +12,15 @@ 12 12 #include <linux/ipv6.h> 13 13 #include <linux/udp.h> 14 14 15 +/* offsetof() is used in static asserts, and the libbpf-redefined CO-RE16 + * friendly version breaks compilation for older clang versions <= 1517 + * when invoked in a static assert. Restore original here.18 + */19 +#ifdef offsetof20 +#undef offsetof21 +#define offsetof(type, member) __builtin_offsetof(type, member)22 +#endif23 +15 24 struct gre_base_hdr { 16 25 uint16_t flags; 17 26 uint16_t protocol;