diff options
author | Ilya Leoshkevich <iii@linux.ibm.com> | 2021-10-26 03:08:27 +0200 |
---|---|---|
committer | Andrii Nakryiko <andrii@kernel.org> | 2021-10-25 20:39:41 -0700 |
commit | 3930198dc9a0720a2b6561c67e55859ec51b73f9 (patch) | |
tree | 1515d8636e9879992791fd5db55d3fd6b5f19f2b /tools/lib/bpf/relo_core.c | |
parent | 45f2bebc8079788f62f22d9e8b2819afb1789d7b (diff) | |
download | linux-3930198dc9a0720a2b6561c67e55859ec51b73f9.tar.gz linux-3930198dc9a0720a2b6561c67e55859ec51b73f9.tar.bz2 linux-3930198dc9a0720a2b6561c67e55859ec51b73f9.zip |
libbpf: Use __BYTE_ORDER__
Use the compiler-defined __BYTE_ORDER__ instead of the libc-defined
__BYTE_ORDER for consistency.
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20211026010831.748682-3-iii@linux.ibm.com
Diffstat (limited to 'tools/lib/bpf/relo_core.c')
-rw-r--r-- | tools/lib/bpf/relo_core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/lib/bpf/relo_core.c b/tools/lib/bpf/relo_core.c index 4016ed492d0c..b5b8956a1be8 100644 --- a/tools/lib/bpf/relo_core.c +++ b/tools/lib/bpf/relo_core.c @@ -662,7 +662,7 @@ static int bpf_core_calc_field_relo(const char *prog_name, *validate = true; /* signedness is never ambiguous */ break; case BPF_FIELD_LSHIFT_U64: -#if __BYTE_ORDER == __LITTLE_ENDIAN +#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ *val = 64 - (bit_off + bit_sz - byte_off * 8); #else *val = (8 - byte_sz) * 8 + (bit_off - byte_off * 8); |