From 4b34042e02929e421484bf047995a59d5634ca59 Mon Sep 17 00:00:00 2001 From: Carlo Bramini <30959007+carlo-bramini@users.noreply.github.com> Date: Wed, 23 Dec 2020 06:27:06 +0100 Subject: [PATCH] Make Unicorn buildable with MinGW (#1364) * [WIN32] Allow to build also with MinGW * [WIN32] Fix build for MinGW --- CMakeLists.txt | 6 +++--- qemu/util/qemu-error.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c2b4da15..30a766cd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -850,7 +850,7 @@ set(UNICORN_SRCS_COMMON uc.c ) -if (MSVC) +if (WIN32) set(UNICORN_SRCS ${UNICORN_SRCS_COMMON} qemu/util/oslib-win32.c @@ -918,7 +918,7 @@ target_compile_options(unicorn PRIVATE ${UNICORN_COMPILE_OPTIONS} ) -if(MSVC) +if(WIN32) if (UNICORN_BUILD_SHARED) target_compile_options(unicorn PRIVATE -DUNICORN_SHARED @@ -939,7 +939,7 @@ else() ) endif() -if(MSVC) +if(WIN32) set(SAMPLES_LIB unicorn ) diff --git a/qemu/util/qemu-error.c b/qemu/util/qemu-error.c index 88f89b71..c3c50546 100644 --- a/qemu/util/qemu-error.c +++ b/qemu/util/qemu-error.c @@ -44,7 +44,7 @@ static void error_print_loc(void) * Prepend the current location and append a newline. * It's wrong to call this in a QMP monitor. Use qerror_report() there. */ -#ifdef _MSC_VER +#ifdef _WIN32 void error_vreport(const char *fmt, va_list ap) { error_print_loc();