summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Dunstan <andrew@dunslane.net>2024-09-14 08:37:08 -0400
committerAndrew Dunstan <andrew@dunslane.net>2024-09-14 08:48:04 -0400
commit648397b1d409f15612b5bb6f95c5527f94e69807 (patch)
tree1ebfd727ca72ef2ef27c647067094f8071a5cbf1
parent4e7b9a1adc4191acc5cca1786312dfacc3395c5f (diff)
Only define NO_THREAD_SAFE_LOCALE for MSVC plperl when required
Latest versions of Strawberry Perl define USE_THREAD_SAFE_LOCALE, and we therefore get a handshake error when building against such instances. The solution is to perform a test to see if USE_THREAD_SAFE_LOCALE is defined and only define NO_THREAD_SAFE_LOCALE if it isn't. Backpatch the meson.build fix back to release 16 and apply the same logic to Mkvcbuild.pm in releases 12 through 16. Original report of the issue from Muralikrishna Bandaru.
-rw-r--r--meson.build5
1 files changed, 4 insertions, 1 deletions
diff --git a/meson.build b/meson.build
index caad34185b7..73f46285fd4 100644
--- a/meson.build
+++ b/meson.build
@@ -1054,7 +1054,10 @@ if not perlopt.disabled()
if cc.get_id() == 'msvc'
# prevent binary mismatch between MSVC built plperl and Strawberry or
# msys ucrt perl libraries
- perl_ccflags += ['-DNO_THREAD_SAFE_LOCALE']
+ perl_v = run_command(perl, '-V').stdout()
+ if not perl_v.contains('USE_THREAD_SAFE_LOCALE')
+ perl_ccflags += ['-DNO_THREAD_SAFE_LOCALE']
+ endif
endif
endif