From 51791d4fe91cef4054922b76f9ce032f74b2479b Mon Sep 17 00:00:00 2001 From: FliegendeWurst <2012gdwu+github@posteo.de> Date: Sun, 15 Dec 2024 15:13:28 +0100 Subject: [PATCH] libthreadar: fix build on Darwin --- pkgs/by-name/li/libthreadar/package.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkgs/by-name/li/libthreadar/package.nix b/pkgs/by-name/li/libthreadar/package.nix index 549142ad0d52..080ead869858 100644 --- a/pkgs/by-name/li/libthreadar/package.nix +++ b/pkgs/by-name/li/libthreadar/package.nix @@ -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"