From a66c54f80067aefca8832a701c66467ba3abc386 Mon Sep 17 00:00:00 2001 From: "J. Scott Berg" Date: Mon, 29 Sep 2025 16:54:03 -0400 Subject: [PATCH 1/2] Remove undef of __STRICT_ANSI__ for msys2 --- cmake/compilers/setupGNU.cmake | 4 ---- 1 file changed, 4 deletions(-) diff --git a/cmake/compilers/setupGNU.cmake b/cmake/compilers/setupGNU.cmake index c81d8d6e7..ac9a8f540 100644 --- a/cmake/compilers/setupGNU.cmake +++ b/cmake/compilers/setupGNU.cmake @@ -42,8 +42,4 @@ if (CMAKE_Fortran_COMPILER_ID MATCHES "GNU") endif() if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++98") - if(WIN32) - # MinGW automatically adds -ansi, so c++ code does not compile without this flag as well.. - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -U__STRICT_ANSI__") - endif() endif() From 1c5a24a744f342534bd0c375727bf07d6526ef12 Mon Sep 17 00:00:00 2001 From: "J. Scott Berg" Date: Mon, 29 Sep 2025 16:55:10 -0400 Subject: [PATCH 2/2] Include header needed for _mkdir on msys2 --- src/mad_port.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mad_port.h b/src/mad_port.h index be9d34e6f..3dfebeafa 100644 --- a/src/mad_port.h +++ b/src/mad_port.h @@ -9,6 +9,8 @@ #ifdef __MINGW32__ // problem with unistd compliance on Cygwin typedef long long off64_t; +// For Windows _mkdir +#include #endif #ifdef _WIN32