libelf/libdwfl: Remove LIB_SYSTEM_H define in lib{elf,dwfl}_crc32.c
authorYonggang Luo <luoyonggang@gmail.com>
Thu, 20 Oct 2022 18:25:43 +0000 (02:25 +0800)
committerMark Wielaard <mark@klomp.org>
Thu, 27 Oct 2022 13:17:38 +0000 (15:17 +0200)
rationale: https://sourceware.org/bugzilla/show_bug.cgi?id=21001

If we don't remove this macro, when try #include <system.h> 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 <luoyonggang@gmail.com>
libdwfl/ChangeLog
libdwfl/libdwfl_crc32.c
libelf/ChangeLog
libelf/libelf_crc32.c

index faa97fc..5254ac4 100644 (file)
@@ -1,3 +1,7 @@
+2022-10-21  Yonggang Luo  <luoyonggang@gmail.com>
+
+       * libdwfl_crc32.c: Remove LIB_SYSTEM_H define.
+
 2022-09-20  Yonggang Luo  <luoyonggang@gmail.com>
 
        * dwfl_segment_report_module.c: Use BYTE_ORDER, LITTLE_ENDIAN and
index b89d0d3..5bc7a4a 100644 (file)
@@ -30,6 +30,5 @@
 #endif
 
 #define crc32 attribute_hidden __libdwfl_crc32
-#define LIB_SYSTEM_H   1
 #include <libdwflP.h>
 #include "../lib/crc32.c"
index 86b12e8..aefb31b 100644 (file)
@@ -1,3 +1,7 @@
+2022-10-21  Yonggang Luo  <luoyonggang@gmail.com>
+
+       * libelf_crc32.c: Remove LIB_SYSTEM_H define.
+
 2022-09-20  Yonggang Luo  <luoyonggang@gmail.com>
 
        * elf32_checksum.c: Use BYTE_ORDER, LITTLE_ENDIAN and BIG_ENDIAN.
index 1426faf..f1cf486 100644 (file)
@@ -30,6 +30,5 @@
 #endif
 
 #define crc32 attribute_hidden __libelf_crc32
-#define LIB_SYSTEM_H   1
 #include <libelf.h>
 #include "../lib/crc32.c"