Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

selftests/seccomp: 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-6-iii@linux.ibm.com

authored by

Ilya Leoshkevich and committed by
Andrii Nakryiko
3e7ed9ce 14e6cac7

+3 -3
+3 -3
tools/testing/selftests/seccomp/seccomp_bpf.c
··· 276 276 } 277 277 #endif 278 278 279 - #if __BYTE_ORDER == __LITTLE_ENDIAN 279 + #if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ 280 280 #define syscall_arg(_n) (offsetof(struct seccomp_data, args[_n])) 281 - #elif __BYTE_ORDER == __BIG_ENDIAN 281 + #elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ 282 282 #define syscall_arg(_n) (offsetof(struct seccomp_data, args[_n]) + sizeof(__u32)) 283 283 #else 284 - #error "wut? Unknown __BYTE_ORDER?!" 284 + #error "wut? Unknown __BYTE_ORDER__?!" 285 285 #endif 286 286 287 287 #define SIBLING_EXIT_UNKILLED 0xbadbeef