On Sat, 16 Aug 2025, Pali Rohár wrote:

---
mingw-w64-crt/crt/crtdll.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/mingw-w64-crt/crt/crtdll.c b/mingw-w64-crt/crt/crtdll.c
index 4f92fcb05422..9404efef7450 100644
--- a/mingw-w64-crt/crt/crtdll.c
+++ b/mingw-w64-crt/crt/crtdll.c
@@ -189,7 +189,9 @@ DllMainCRTStartup (HANDLE hDllHandle, DWORD dwReason, 
LPVOID lpreserved)
{
  WINBOOL retcode = TRUE;

-  __mingw_app_type = 0;
+  if (dwReason == DLL_PROCESS_ATTACH)
+    __mingw_app_type = 0;
+
  __native_dllmain_reason = dwReason;
  if (dwReason == DLL_PROCESS_DETACH && __proc_attached <= 0)
    {
--
2.20.1

This looks trivially ok to me, so I pushed it.

// Martin

_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to