diff options
author | Andrew Dunstan <andrew@dunslane.net> | 2022-11-27 09:03:22 -0500 |
---|---|---|
committer | Andrew Dunstan <andrew@dunslane.net> | 2022-11-27 09:18:40 -0500 |
commit | 85565cbcad4a78dab5a60c457b0f6e0a740539ce (patch) | |
tree | 3cee557ab6cd9841e0232fa431ade7489a4c68ba /src | |
parent | 27a5a0ee20eaf01cdf53f48498379b19e8f52e83 (diff) | |
download | postgresql-85565cbcad4a78dab5a60c457b0f6e0a740539ce.tar.gz postgresql-85565cbcad4a78dab5a60c457b0f6e0a740539ce.zip |
Fix binary mismatch for MSVC plperl vs gcc built perl libs
When loading plperl built against Strawberry perl or the msys2 ucrt perl
that have been built with gcc, a binary mismatch has been encountered
which looks like this:
loadable library and perl binaries are mismatched (got handshake key 0000000012800080, needed 0000000012900080)
To cure this we bring the handshake keys into sync by adding
NO_THREAD_SAFE_LOCALE to the defines used to build plperl.
Discussion: https://postgr.es/m/20211005004334.tgjmro4kuachwiuc@alap3.anarazel.de
Discussion: https://postgr.es/m/c2da86a0-2906-744c-923d-16da6047875e@dunslane.net
Backpatch to all live branches.
Diffstat (limited to 'src')
-rw-r--r-- | src/tools/msvc/Mkvcbuild.pm | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/tools/msvc/Mkvcbuild.pm b/src/tools/msvc/Mkvcbuild.pm index 131a4c76c4f..1bdc33d7168 100644 --- a/src/tools/msvc/Mkvcbuild.pm +++ b/src/tools/msvc/Mkvcbuild.pm @@ -573,6 +573,9 @@ sub mkvcbuild # hack to prevent duplicate definitions of uid_t/gid_t push(@perl_embed_ccflags, 'PLPERL_HAVE_UID_GID'); + # prevent binary mismatch between MSVC built plperl and + # Strawberry or msys ucrt perl libraries + push(@perl_embed_ccflags, 'NO_THREAD_SAFE_LOCALE'); # Windows offers several 32-bit ABIs. Perl is sensitive to # sizeof(time_t), one of the ABI dimensions. To get 32-bit time_t, |