diff options
Diffstat (limited to 'tools/lib/bpf/btf.c')
-rw-r--r-- | tools/lib/bpf/btf.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/lib/bpf/btf.c b/tools/lib/bpf/btf.c index 467224feb43b..d821107f55f9 100644 --- a/tools/lib/bpf/btf.c +++ b/tools/lib/bpf/btf.c | |||
@@ -1,6 +1,7 @@ | |||
1 | // SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause) | 1 | // SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause) |
2 | /* Copyright (c) 2018 Facebook */ | 2 | /* Copyright (c) 2018 Facebook */ |
3 | 3 | ||
4 | #include <endian.h> | ||
4 | #include <stdio.h> | 5 | #include <stdio.h> |
5 | #include <stdlib.h> | 6 | #include <stdlib.h> |
6 | #include <string.h> | 7 | #include <string.h> |
@@ -419,9 +420,9 @@ done: | |||
419 | 420 | ||
420 | static bool btf_check_endianness(const GElf_Ehdr *ehdr) | 421 | static bool btf_check_endianness(const GElf_Ehdr *ehdr) |
421 | { | 422 | { |
422 | #if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ | 423 | #if __BYTE_ORDER == __LITTLE_ENDIAN |
423 | return ehdr->e_ident[EI_DATA] == ELFDATA2LSB; | 424 | return ehdr->e_ident[EI_DATA] == ELFDATA2LSB; |
424 | #elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ | 425 | #elif __BYTE_ORDER == __BIG_ENDIAN |
425 | return ehdr->e_ident[EI_DATA] == ELFDATA2MSB; | 426 | return ehdr->e_ident[EI_DATA] == ELFDATA2MSB; |
426 | #else | 427 | #else |
427 | # error "Unrecognized __BYTE_ORDER__" | 428 | # error "Unrecognized __BYTE_ORDER__" |