diff options
author | Yonghong Song <yonghong.song@linux.dev> | 2023-08-18 10:43:12 -0700 |
---|---|---|
committer | Martin KaFai Lau <martin.lau@kernel.org> | 2023-08-18 12:19:22 -0700 |
commit | 0a55264cf966fb95ebf9d03d9f81fa992f069312 (patch) | |
tree | 940dbde9efa300d1974ee00494a6a0469e6a67ec /samples/bpf/tracex1_kern.c | |
parent | 63ae8eb2c5b1388eeda39bc95e89e4ad906fa336 (diff) | |
download | linux-0a55264cf966fb95ebf9d03d9f81fa992f069312.tar.gz linux-0a55264cf966fb95ebf9d03d9f81fa992f069312.tar.bz2 linux-0a55264cf966fb95ebf9d03d9f81fa992f069312.zip |
selftests/bpf: Fix a selftest compilation error
When building the kernel and selftest with clang compiler (llvm17 or llvm18),
I hit the following compilation failure:
In file included from progs/test_lwt_redirect.c:3:
In file included from /usr/include/linux/ip.h:21:
In file included from /usr/include/asm/byteorder.h:5:
In file included from /usr/include/linux/byteorder/little_endian.h:13:
/usr/include/linux/swab.h:136:8: error: unknown type name '__always_inline'
136 | static __always_inline unsigned long __swab(const unsigned long y)
| ^
/usr/include/linux/swab.h:171:8: error: unknown type name '__always_inline'
171 | static __always_inline __u16 __swab16p(const __u16 *p)
...
bpf_helpers.h file provided a definition for __always_inline.
Putting 'ip.h' after 'bpf_helpers.h' fixed the issue.
Fixes: 43a7c3ef8a15 ("selftests/bpf: Add lwt_xmit tests for BPF_REDIRECT")
Signed-off-by: Yonghong Song <yonghong.song@linux.dev>
Link: https://lore.kernel.org/r/20230818174312.1883381-1-yonghong.song@linux.dev
Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
Diffstat (limited to 'samples/bpf/tracex1_kern.c')
0 files changed, 0 insertions, 0 deletions