From a8f0318881d7b3e6b5a69b1b56c17478a71fdb4f Mon Sep 17 00:00:00 2001 From: Thays Date: Tue, 9 Mar 2021 16:33:02 -0300 Subject: [PATCH] Fix arm64 compilation --- src/coreclr/debug/createdump/createdump.h | 2 ++ src/coreclr/debug/dbgutil/elfreader.cpp | 2 ++ src/coreclr/debug/dbgutil/machoreader.cpp | 6 ++++-- src/coreclr/gc/unix/gcenv.unix.cpp | 2 ++ src/coreclr/pal/src/exception/remote-unwind.cpp | 4 +++- src/coreclr/pal/src/exception/seh-unwind.cpp | 2 ++ src/coreclr/pal/src/misc/sysinfo.cpp | 2 ++ 7 files changed, 17 insertions(+), 3 deletions(-) diff --git a/src/coreclr/debug/createdump/createdump.h b/src/coreclr/debug/createdump/createdump.h index 41cb93414374d..b18348459c2e9 100644 --- a/src/coreclr/debug/createdump/createdump.h +++ b/src/coreclr/debug/createdump/createdump.h @@ -70,7 +70,9 @@ typedef int T_CONTEXT; #include #include #endif +#ifndef __STDC_FORMAT_MACROS #define __STDC_FORMAT_MACROS +#endif #include #else #include diff --git a/src/coreclr/debug/dbgutil/elfreader.cpp b/src/coreclr/debug/dbgutil/elfreader.cpp index 5cbb4ca0efd68..5beb84a482ef9 100644 --- a/src/coreclr/debug/dbgutil/elfreader.cpp +++ b/src/coreclr/debug/dbgutil/elfreader.cpp @@ -5,7 +5,9 @@ #include #include #include +#ifndef __STDC_FORMAT_MACROS #define __STDC_FORMAT_MACROS +#endif #include #include "elfreader.h" diff --git a/src/coreclr/debug/dbgutil/machoreader.cpp b/src/coreclr/debug/dbgutil/machoreader.cpp index fa94b49b8d4a4..7ea7ba115e44a 100644 --- a/src/coreclr/debug/dbgutil/machoreader.cpp +++ b/src/coreclr/debug/dbgutil/machoreader.cpp @@ -5,7 +5,9 @@ #include #include #include +#ifndef __STDC_FORMAT_MACROS #define __STDC_FORMAT_MACROS +#endif #include #include #include "machoreader.h" @@ -72,7 +74,7 @@ TryGetSymbol(ICorDebugDataTarget* dataTarget, uint64_t baseAddress, const char* } //-------------------------------------------------------------------- -// MachO module +// MachO module //-------------------------------------------------------------------- MachOModule::MachOModule(MachOReader& reader, mach_vm_address_t baseAddress, mach_header_64* header, std::string* name) : @@ -202,7 +204,7 @@ MachOModule::ReadLoadCommands() m_segments.push_back(segment); // Calculate the load bias for the module. This is the value to add to the vmaddr of a - // segment to get the actual address. + // segment to get the actual address. if (strcmp(segment->segname, SEG_TEXT) == 0) { m_loadBias = m_baseAddress - segment->vmaddr; diff --git a/src/coreclr/gc/unix/gcenv.unix.cpp b/src/coreclr/gc/unix/gcenv.unix.cpp index ecef15208124c..2b3c00a3d4065 100644 --- a/src/coreclr/gc/unix/gcenv.unix.cpp +++ b/src/coreclr/gc/unix/gcenv.unix.cpp @@ -6,7 +6,9 @@ #include #include #include +#ifndef __STDC_FORMAT_MACROS #define __STDC_FORMAT_MACROS +#endif #include #include #include diff --git a/src/coreclr/pal/src/exception/remote-unwind.cpp b/src/coreclr/pal/src/exception/remote-unwind.cpp index d31f0abbdadb5..93a6b8a874de2 100644 --- a/src/coreclr/pal/src/exception/remote-unwind.cpp +++ b/src/coreclr/pal/src/exception/remote-unwind.cpp @@ -47,7 +47,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "pal/debug.h" #include "pal_endian.h" #include "pal.h" -#ifndef DBI_COMPONENT_MONO +#ifndef __STDC_FORMAT_MACROS #define __STDC_FORMAT_MACROS #endif #include @@ -85,7 +85,9 @@ SET_DEFAULT_DEBUG_CHANNEL(EXCEPT); #else // HOST_UNIX #include +#ifndef __STDC_FORMAT_MACROS #define __STDC_FORMAT_MACROS +#endif #include #include #include "debugmacros.h" diff --git a/src/coreclr/pal/src/exception/seh-unwind.cpp b/src/coreclr/pal/src/exception/seh-unwind.cpp index 5f4df9ae4dc78..a305a246e096a 100644 --- a/src/coreclr/pal/src/exception/seh-unwind.cpp +++ b/src/coreclr/pal/src/exception/seh-unwind.cpp @@ -38,7 +38,9 @@ Module Name: #else // HOST_UNIX #include +#ifndef __STDC_FORMAT_MACROS #define __STDC_FORMAT_MACROS +#endif #include #include #include "debugmacros.h" diff --git a/src/coreclr/pal/src/misc/sysinfo.cpp b/src/coreclr/pal/src/misc/sysinfo.cpp index 1a9ca8fbfba72..25fa40f3d72f1 100644 --- a/src/coreclr/pal/src/misc/sysinfo.cpp +++ b/src/coreclr/pal/src/misc/sysinfo.cpp @@ -24,7 +24,9 @@ Revision History: #include #include #include +#ifndef __STDC_FORMAT_MACROS #define __STDC_FORMAT_MACROS +#endif #include #include