From d38385012275488f3b77dea59f15bebb1b6d663d Mon Sep 17 00:00:00 2001
From: Alexey Pavlov <alexpux@gmail.com>
Date: Sat, 6 Sep 2025 10:43:56 +0300
Subject: [PATCH 173/N] Try fix 64-bit time support for 32-bit build again

---
 configure.ac | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index b2ff159..4745388 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1010,6 +1010,13 @@ if test -z "$CFLAGS"; then
         CFLAGS=
 fi
 
+dnl Build 32-bit mingw-w64 platform with 64-bit time support.
+case $host in
+  i686-*-mingw*)
+    CFLAGS="$CFLAGS -D__MINGW_USE_VC2005_COMPAT"
+    ;;
+esac
+
 dnl Emscripten SDK and WASI SDK default to wasm32.
 dnl On Emscripten use MEMORY64 setting to build target wasm64-emscripten.
 dnl for wasm64.
@@ -2646,7 +2653,7 @@ yes)
     # this only occues on mingw
     case $host in
     *-*-mingw*)
-        CFLAGS_NODIST="$CFLAGS_NODIST -Wno-error=incompatible-pointer-types -D__MINGW_USE_VC2005_COMPAT"
+        CFLAGS_NODIST="$CFLAGS_NODIST -Wno-error=incompatible-pointer-types"
       ;;
     esac
 
