libthreadar: fix build on Darwin (#365379)

This commit is contained in:
misuzu 2024-12-15 16:33:04 +02:00 committed by GitHub
commit 1862db4f06
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -14,6 +14,13 @@ stdenv.mkDerivation rec {
sha256 = "sha256-wJAkIUGK7Ud6n2p1275vNkSx/W7LlgKWXQaDevetPko=";
};
postPatch = ''
# this field is not present on Darwin, ensure it is zero everywhere
substituteInPlace src/thread_signal.cpp \
--replace-fail 'sigac.sa_restorer = nullptr;' "" \
--replace-fail 'struct sigaction sigac;' 'struct sigaction sigac = {0};'
'';
outputs = [
"out"
"dev"