diff options
author | Yonggang Luo <luoyonggang@gmail.com> | 2022-09-20 16:43:05 +0800 |
---|---|---|
committer | Mark Wielaard <mark@klomp.org> | 2022-10-17 10:35:21 +0200 |
commit | 0e18267a05247b5bda60115270203b4ad3af8e55 (patch) | |
tree | 4b14d75d4d88d13b30327772cfe74126dce4d6ea /libelf/elf32_checksum.c | |
parent | 96263dfee3591a9c732b00a33a4a221b8f01bf46 (diff) | |
download | elfutils-0e18267a05247b5bda60115270203b4ad3af8e55.tar.gz |
Strip __ prefix from __BYTE_ORDER __LITTLE_ENDIAN and __BIG_ENDIAN
__BYTE_ORDER, __LITTLE_ENDIAN and __BIG_ENDIAN are defined by the
gcc/clang preprocessor. BYTE_ORDER, LITTLE_ENDIAN and BIG_ENDIAN are
defined in <endian.h>.
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Diffstat (limited to 'libelf/elf32_checksum.c')
-rw-r--r-- | libelf/elf32_checksum.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libelf/elf32_checksum.c b/libelf/elf32_checksum.c index 521668a7..a47b307d 100644 --- a/libelf/elf32_checksum.c +++ b/libelf/elf32_checksum.c @@ -73,9 +73,9 @@ elfw2(LIBELFBITS,checksum) (Elf *elf) is the same. */ ident = elf->state.ELFW(elf,LIBELFBITS).ehdr->e_ident; same_byte_order = ((ident[EI_DATA] == ELFDATA2LSB - && __BYTE_ORDER == __LITTLE_ENDIAN) + && BYTE_ORDER == LITTLE_ENDIAN) || (ident[EI_DATA] == ELFDATA2MSB - && __BYTE_ORDER == __BIG_ENDIAN)); + && BYTE_ORDER == BIG_ENDIAN)); /* If we don't have native byte order, we will likely need to convert the data with xlate functions. We do it upfront instead |