Skip to content
This repository was archived by the owner on Jan 29, 2026. It is now read-only.

Commit 76e7357

Browse files
committed
build/meson: only add WINPTHREAD_COND_DECL workaround if winpthreads is found
1 parent ca48cf5 commit 76e7357

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

meson.build

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,12 @@ msft_proxy4_dep = declare_dependency(
6161
modules = get_option('modules')
6262
modules_interface_spec = {
6363
'gcc': {
64-
'flags': [
65-
'-fmodules',
66-
'-fdeps-format=p1689r5',
64+
'flags': ['-fmodules', '-fdeps-format=p1689r5'] + (cxx.has_header_symbol(
65+
'pthread.h',
66+
'__WINPTHREADS_VERSION',
67+
) ? [
6768
'-DWINPTHREAD_COND_DECL=WINPTHREADS_ALWAYS_INLINE',
68-
],
69+
] : []),
6970
'check_only': ['-M'],
7071
},
7172
'msvc': {

0 commit comments

Comments
 (0)