From c90321712e77177d2e6234ed5b11986c28370840 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Metehan=20=C3=96zt=C3=BCrk?= Date: Sun, 21 Dec 2025 02:20:28 +0300 Subject: [PATCH 1/2] bugfix/mingw-timeapi --- portable/MSVC-MingW/port.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/portable/MSVC-MingW/port.c b/portable/MSVC-MingW/port.c index 540c4a4bc5..ca3d24ab65 100644 --- a/portable/MSVC-MingW/port.c +++ b/portable/MSVC-MingW/port.c @@ -39,7 +39,11 @@ #include #endif -#include +#ifdef _MSC_VER + #include +#else + #include +#endif #ifdef __GNUC__ #include "mmsystem.h" From 943af4257a8a75ce55f670605d40baf014949b0c Mon Sep 17 00:00:00 2001 From: nordync <225464921+nordync@users.noreply.github.com> Date: Tue, 23 Dec 2025 12:48:48 +0300 Subject: [PATCH 2/2] fix: clean up Windows timer includes - Removed legacy GCC-specific include block. - Added compiler-specific headers: - MSVC (_MSC_VER): includes and links winmm.lib - Other compilers: includes - Ensures cross-compiler compatibility and avoids duplicate headers. --- portable/MSVC-MingW/port.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/portable/MSVC-MingW/port.c b/portable/MSVC-MingW/port.c index ca3d24ab65..d992c4d3c0 100644 --- a/portable/MSVC-MingW/port.c +++ b/portable/MSVC-MingW/port.c @@ -41,16 +41,11 @@ #ifdef _MSC_VER #include + #pragma comment(lib, "winmm.lib") #else #include #endif -#ifdef __GNUC__ - #include "mmsystem.h" -#else - #pragma comment(lib, "winmm.lib") -#endif - #define portMAX_INTERRUPTS ( ( uint32_t ) sizeof( uint32_t ) * 8UL ) /* The number of bits in an uint32_t. */ #define portNO_CRITICAL_NESTING ( ( uint32_t ) 0 )