From e2f8d7bd447bf06496cf3f8c151ccbb58e08ebbe Mon Sep 17 00:00:00 2001 From: Will Dietz Date: Sat, 13 Oct 2018 19:53:19 -0500 Subject: [PATCH] libbsd: fix build w/musl by adding missing include Patch from void, with prefix added. --- pkgs/development/libraries/libbsd/default.nix | 4 +++- pkgs/development/libraries/libbsd/musl.patch | 14 ++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 pkgs/development/libraries/libbsd/musl.patch diff --git a/pkgs/development/libraries/libbsd/default.nix b/pkgs/development/libraries/libbsd/default.nix index dc7213acd63..a8d1925e5c0 100644 --- a/pkgs/development/libraries/libbsd/default.nix +++ b/pkgs/development/libraries/libbsd/default.nix @@ -13,7 +13,9 @@ stdenv.mkDerivation rec { # the configure scripts nativeBuildInputs = [ autoreconfHook ]; - patches = stdenv.lib.optional stdenv.isDarwin ./darwin.patch; + patches = stdenv.lib.optional stdenv.isDarwin ./darwin.patch + # Suitable for all but limited to musl to avoid rebuild + ++ stdenv.lib.optional stdenv.hostPlatform.isMusl ./musl.patch; meta = with stdenv.lib; { description = "Common functions found on BSD systems"; diff --git a/pkgs/development/libraries/libbsd/musl.patch b/pkgs/development/libraries/libbsd/musl.patch new file mode 100644 index 00000000000..fc07cfb6e85 --- /dev/null +++ b/pkgs/development/libraries/libbsd/musl.patch @@ -0,0 +1,14 @@ +Source: maxice8 +Upstream: no +Reason: fixes compilation + +--- a/src/flopen.c ++++ b/src/flopen.c +@@ -34,6 +34,7 @@ + #include + #include + #include ++#include + + #include +