From b3c536e4e065801ed59d9c4264a7f1a57512be09 Mon Sep 17 00:00:00 2001
From: Rob Swindell <rob@synchro.net>
Date: Sun, 20 Feb 2022 16:53:49 -0800
Subject: [PATCH] pthread_mutex_t is a CRITICAL_SECTION (not a pointer) on
 Win32

Partially revert Deuce's commit b4bc9c9759e6f34c272501e024

This explains the EAccessViolation (stack corruption during sbbs startup) that sysops have reported when using the latest nightly builds.
---
 src/xpdev/threadwrap.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/xpdev/threadwrap.h b/src/xpdev/threadwrap.h
index a2098ad519..cc6cdc8098 100644
--- a/src/xpdev/threadwrap.h
+++ b/src/xpdev/threadwrap.h
@@ -75,7 +75,7 @@ extern "C" {
 
 	#else	/* Implemented as Win32 Critical Sections */
 
-		typedef intptr_t pthread_mutex_t;
+		typedef CRITICAL_SECTION pthread_mutex_t;
 
 	#endif
 
-- 
GitLab