From 995b3010a8933c0a9ff9e11ec1c63d0df5cc4a0a Mon Sep 17 00:00:00 2001 From: "J.W. Jagersma" Date: Sat, 30 Dec 2023 18:54:29 +0100 Subject: [PATCH] define WIN32_LEAN_AND_MEAN on mingw --- script/init.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/script/init.sh b/script/init.sh index 448d2b4..5e5cfcd 100644 --- a/script/init.sh +++ b/script/init.sh @@ -58,9 +58,14 @@ else fi rm -f hello.c 2> /dev/null -# Make sure MSYS2 Perl is used on mingw-w64 (see issue #27) case $(uname) in -MINGW*) export PERL=/usr/bin/perl ;; +MINGW*) + # Make sure MSYS2 Perl is used on mingw-w64 (see issue #27) + export PERL=/usr/bin/perl + # Required to build gcc on recent mingw-w64 (see issue #41) + CFLAGS+=' -DWIN32_LEAN_AND_MEAN' + CXXFLAGS+=' -DWIN32_LEAN_AND_MEAN' + ;; esac install_files()