From b9a21f445cf653d46c77e4a3e8637e5811ffe7ed Mon Sep 17 00:00:00 2001 From: ManasBagul23 Date: Wed, 18 Nov 2026 17:20:58 +0530 Subject: [PATCH] thread: fix undefined _CUPS_MUTEX_INITIALIZER on Windows ppd_global_mutex, the lazy-init guard for per-mutex CRITICAL_SECTION initialization in the Windows (_WIN32) branch of this file, was initialized with _CUPS_MUTEX_INITIALIZER. That macro does not exist anywhere in this codebase -- the header right above it only defines _PPD_MUTEX_INITIALIZER (for all three threading backends: pthreads, Windows, and none). Nothing in the included headers defines it either, so this is a plain undeclared-identifier error wherever this file actually gets compiled for Windows, which the project's CI never exercises (no Windows build/test job, and the only thread-safety test for this file uses pthreads unconditionally). Use the macro this header actually defines. --- ppd/thread.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ppd/thread.c b/ppd/thread.c index d62f0011d..b05e9c827 100644 --- a/ppd/thread.c +++ b/ppd/thread.c @@ -51,7 +51,7 @@ _ppdMutexUnlock(_ppd_mutex_t *mutex) // I - Mutex #elif defined(_WIN32) # include -static _ppd_mutex_t ppd_global_mutex = _CUPS_MUTEX_INITIALIZER; +static _ppd_mutex_t ppd_global_mutex = _PPD_MUTEX_INITIALIZER; // Global critical section