Repository navigation
fix(obs-c-oracle): keep the mingw pthread names around the pause lock probes - #4191
Merged
Merged
Conversation
… probes Fixes #4168. Since #4059 every master Fast Gate fails in the Windows cross build of the C oracle: output_pause_queries.c defines pthread_mutex_lock and pthread_mutex_unlock as its lock probes, and the mingw build already defines both on the command line (-Dpthread_mutex_lock= oracle_pthread_mutex_lock, the w32-pthreads renaming), so -Werror stops at "'pthread_mutex_lock' redefined". Save the two macros with #pragma push_macro, undefine them for the probes, and restore them with #pragma pop_macro after the include. The probes work on every host, and the rest of the file keeps the renaming. Co-Authored-By: Claude Opus 5.5 <[email protected]>
vpacher
enabled auto-merge
November 9, 2026 08:13
This was referenced Nov 9, 2026
7 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #4168.
Problem
Since #4059 (9a95b46), every master Fast Gate fails in the Windows cross build of the C oracle:
output_pause_queries.ccounts the lock calls ofobs-output-pause-queries.c.hby definingpthread_mutex_lockandpthread_mutex_unlockas its probes. The mingw build already defines both on the command line (-Dpthread_mutex_lock=oracle_pthread_mutex_lock, the w32-pthreads renaming).Change
#pragma push_macrosaves the two macros,#undefclears them for the probe defines, and#pragma pop_macrorestores them after the include. The probes work on every host; the rest of the file keeps the renaming. GCC, Clang and MSVC support both pragmas.Tests
A focused CI fix (coordination.md §4): RED and GREEN are local runs, in one commit.
The failing step is the
rust-testlane's windows-gnu link check (ci/local_gate.py,lane_rust_test), which runs only in the full lane on master; a PR's Fast Gate runs only the touched crates' tests (test_diff), so #4059's own PR did not reach it. The same step, limited to the oracle crate, on a Linux host:output_pause_queries.c:41:9: error: 'pthread_mutex_lock' redefined [-Werror]and the same forpthread_mutex_unlockat 42:9, as in CI.soldr cargo test -p obs-data --test obs-tests-core output_pause_queries: 8 passed, includingoffset_is_read_between_matching_lock_and_unlock, which depends on the lock probes.🤖 Generated with Claude Code