From 10f01dad96325706c746000e467e2a33197e6ea2 Mon Sep 17 00:00:00 2001 From: Yonggang Luo Date: Fri, 21 Oct 2022 02:25:43 +0800 Subject: [PATCH] libelf/libdwfl: Remove LIB_SYSTEM_H define in lib{elf,dwfl}_crc32.c MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit rationale: https://sourceware.org/bugzilla/show_bug.cgi?id=21001 If we don't remove this macro, when try #include in libdw/memory-access.h wont' take effect because "#define LIB_SYSTEM_H 1" The compile error: ./../libdw/memory-access.h:390:12: error: implicit declaration of function ‘bswap_32’ [-Werror=implicit-function-declaration] Signed-off-by: Yonggang Luo --- libdwfl/ChangeLog | 4 ++++ libdwfl/libdwfl_crc32.c | 1 - libelf/ChangeLog | 4 ++++ libelf/libelf_crc32.c | 1 - 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/libdwfl/ChangeLog b/libdwfl/ChangeLog index faa97fc..5254ac4 100644 --- a/libdwfl/ChangeLog +++ b/libdwfl/ChangeLog @@ -1,3 +1,7 @@ +2022-10-21 Yonggang Luo + + * libdwfl_crc32.c: Remove LIB_SYSTEM_H define. + 2022-09-20 Yonggang Luo * dwfl_segment_report_module.c: Use BYTE_ORDER, LITTLE_ENDIAN and diff --git a/libdwfl/libdwfl_crc32.c b/libdwfl/libdwfl_crc32.c index b89d0d3..5bc7a4a 100644 --- a/libdwfl/libdwfl_crc32.c +++ b/libdwfl/libdwfl_crc32.c @@ -30,6 +30,5 @@ #endif #define crc32 attribute_hidden __libdwfl_crc32 -#define LIB_SYSTEM_H 1 #include #include "../lib/crc32.c" diff --git a/libelf/ChangeLog b/libelf/ChangeLog index 86b12e8..aefb31b 100644 --- a/libelf/ChangeLog +++ b/libelf/ChangeLog @@ -1,3 +1,7 @@ +2022-10-21 Yonggang Luo + + * libelf_crc32.c: Remove LIB_SYSTEM_H define. + 2022-09-20 Yonggang Luo * elf32_checksum.c: Use BYTE_ORDER, LITTLE_ENDIAN and BIG_ENDIAN. diff --git a/libelf/libelf_crc32.c b/libelf/libelf_crc32.c index 1426faf..f1cf486 100644 --- a/libelf/libelf_crc32.c +++ b/libelf/libelf_crc32.c @@ -30,6 +30,5 @@ #endif #define crc32 attribute_hidden __libelf_crc32 -#define LIB_SYSTEM_H 1 #include #include "../lib/crc32.c" -- 2.7.4