libthreadar: fix build on Darwin

This commit is contained in:
FliegendeWurst 2024-12-15 15:13:28 +01:00
parent 3e1fd6ea65
commit 51791d4fe9

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"