From 5f8fe0e5bb67a52f14dec50e8517a126c059aaf7 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Tue, 13 Oct 2020 05:59:35 -0700 Subject: [PATCH] Enable standard stdio methods with MinGW This unfortunately doesn't fix the %z warnings for whatever reason, but it should help guarantee correct function behavior by not relying on msvcrt's stdio functions. --- CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7d09547c..e7f82dc3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -116,6 +116,9 @@ set(EXTRA_LIBS ) if(WIN32) set(CPP_DEFS ${CPP_DEFS} _WIN32) + if(MINGW) + set(CPP_DEFS ${CPP_DEFS} __USE_MINGW_ANSI_STDIO) + endif() option(ALSOFT_BUILD_ROUTER "Build the router (EXPERIMENTAL; creates OpenAL32.dll and soft_oal.dll)" OFF) if(MINGW)