Skip to content

Fix undefined mutex initializer in Windows thread backend - #113

Merged
tillkamppeter merged 1 commit into
OpenPrinting:masterfrom
ManasBagul23:fix/thread-win32-undefined-mutex-initializer
Nov 18, 2026
Merged

tillkamppeter merged 1 commit into
OpenPrinting:masterfrom
ManasBagul23:fix/thread-win32-undefined-mutex-initializer

Conversation

@ManasBagul23

Copy link
Copy Markdown
Contributor

The Windows branch initializes ppd_global_mutex with _CUPS_MUTEX_INITIALIZER, which is not defined in this codebase. The local header defines _PPD_MUTEX_INITIALIZER for each threading backend. Use that macro so the Windows implementation compiles.

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.
Copilot AI balanced review requested due to automatic review settings November 18, 2026 19:03

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@tillkamppeter
tillkamppeter merged commit fca6322 into OpenPrinting:master Nov 18, 2026
14 of 15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants