From 71b826458df0d043b7c88985a740d07162451532 Mon Sep 17 00:00:00 2001 From: Geoffrey McRae Date: Tue, 27 Feb 2024 18:54:39 +1100 Subject: [PATCH] [host] fix host-windows-cross github compilation --- common/src/platform/windows/CMakeLists.txt | 2 ++ host/CMakeLists.txt | 1 + host/platform/Windows/capture/D12/backend/dd.c | 1 - 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/common/src/platform/windows/CMakeLists.txt b/common/src/platform/windows/CMakeLists.txt index 7983fcce..0e303a80 100644 --- a/common/src/platform/windows/CMakeLists.txt +++ b/common/src/platform/windows/CMakeLists.txt @@ -8,6 +8,8 @@ include_directories( # allow use of functions for Windows 7 or later add_compile_definitions(WINVER=0x0601 _WIN32_WINNT=0x0601) +add_compile_definitions(__USE_MINGW_ANSI_STDIO=0) + if (MINGW) # Build our own ntdll.dll import library # This tricks MinGW into not linking stuff like memcpy from ntdll.dll instead of mscvrt.dll diff --git a/host/CMakeLists.txt b/host/CMakeLists.txt index aadcb84f..ee2364a8 100644 --- a/host/CMakeLists.txt +++ b/host/CMakeLists.txt @@ -49,6 +49,7 @@ set(CMAKE_C_STANDARD 11) if(WIN32) add_compile_options("-fdebug-prefix-map=${PROJECT_TOP}/=") + add_compile_definitions(__USE_MINGW_ANSI_STDIO=0) endif() if(ENABLE_ASAN) diff --git a/host/platform/Windows/capture/D12/backend/dd.c b/host/platform/Windows/capture/D12/backend/dd.c index e874f351..f251735c 100644 --- a/host/platform/Windows/capture/D12/backend/dd.c +++ b/host/platform/Windows/capture/D12/backend/dd.c @@ -28,7 +28,6 @@ #include #include -#include #include #include