From bdf8a3b45f063d010e7c93b3d3bfc42b801ee9b2 Mon Sep 17 00:00:00 2001 From: Yonggang Luo Date: Thu, 20 Oct 2022 02:50:03 +0800 Subject: [PATCH] libdw: Fixes compile of dwarf_whatattr.c and dwarf_whatform.c If __OPTIMIZE__ is defined, then compile dwarf_whatattr.c and dwarf_whatform.c will cause symbol conflict between dwarf_whatattr.c and libdw.h, dwarf_whatform.c and libdw.h, So always undefined __OPTIMIZE__ when compiling these two files Signed-off-by: Yonggang Luo --- libdw/dwarf_whatattr.c | 4 +++- libdw/dwarf_whatform.c | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/libdw/dwarf_whatattr.c b/libdw/dwarf_whatattr.c index d664b021..c016f293 100644 --- a/libdw/dwarf_whatattr.c +++ b/libdw/dwarf_whatattr.c @@ -30,7 +30,9 @@ #ifdef HAVE_CONFIG_H # include #endif - +#ifdef __OPTIMIZE__ +#undef __OPTIMIZE__ +#endif #include #include "libdwP.h" diff --git a/libdw/dwarf_whatform.c b/libdw/dwarf_whatform.c index dee29a9f..f1d3574d 100644 --- a/libdw/dwarf_whatform.c +++ b/libdw/dwarf_whatform.c @@ -30,7 +30,9 @@ #ifdef HAVE_CONFIG_H # include #endif - +#ifdef __OPTIMIZE__ +#undef __OPTIMIZE__ +#endif #include #include "libdwP.h" -- 2.39.0.windows.1