[PATCH 04/25] libelf/libdwfl: Remove "#define LIB_SYSTEM_H 1" in libelf_crc32.c and libdwfl_crc32.c
Yonggang Luo
luoyonggang@gmail.com
Thu Oct 20 18:25:43 GMT 2022
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/libdwfl_crc32.c | 1 -
libelf/libelf_crc32.c | 1 -
2 files changed, 2 deletions(-)
diff --git a/libdwfl/libdwfl_crc32.c b/libdwfl/libdwfl_crc32.c
index b89d0d36..5bc7a4ad 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 <libdwflP.h>
#include "../lib/crc32.c"
diff --git a/libelf/libelf_crc32.c b/libelf/libelf_crc32.c
index 1426faf1..f1cf4868 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 <libelf.h>
#include "../lib/crc32.c"
--
2.36.1.windows.1
More information about the Elfutils-devel
mailing list