summary refs log tree commit diff
path: root/pkgs/development/libraries/libdaemon
diff options
context:
space:
mode:
authorWill Dietz <w@wdtz.org>2017-05-27 18:40:27 -0500
committerWill Dietz <w@wdtz.org>2018-02-13 09:44:50 -0600
commit0153599164e7ef2266c9de4979369daadb3a3cad (patch)
tree5c08066c130d833ae07e3606a139d6c1dfe33b00 /pkgs/development/libraries/libdaemon
parente2ef21d9b5dddc0996c453f65a686ff871b6ac94 (diff)
downloadnixpkgs-0153599164e7ef2266c9de4979369daadb3a3cad.tar
nixpkgs-0153599164e7ef2266c9de4979369daadb3a3cad.tar.gz
nixpkgs-0153599164e7ef2266c9de4979369daadb3a3cad.tar.bz2
nixpkgs-0153599164e7ef2266c9de4979369daadb3a3cad.tar.lz
nixpkgs-0153599164e7ef2266c9de4979369daadb3a3cad.tar.xz
nixpkgs-0153599164e7ef2266c9de4979369daadb3a3cad.tar.zst
nixpkgs-0153599164e7ef2266c9de4979369daadb3a3cad.zip
libdaemon: Add patch to fix musl build
Diffstat (limited to 'pkgs/development/libraries/libdaemon')
-rw-r--r--pkgs/development/libraries/libdaemon/default.nix8
-rw-r--r--pkgs/development/libraries/libdaemon/fix-includes.patch13
2 files changed, 19 insertions, 2 deletions
diff --git a/pkgs/development/libraries/libdaemon/default.nix b/pkgs/development/libraries/libdaemon/default.nix
index af832a70a73..59e576fd392 100644
--- a/pkgs/development/libraries/libdaemon/default.nix
+++ b/pkgs/development/libraries/libdaemon/default.nix
@@ -1,6 +1,6 @@
 {stdenv, fetchurl}:
 
-stdenv.mkDerivation rec {
+stdenv.mkDerivation (rec {
   name = "libdaemon-0.14";
 
   src = fetchurl {
@@ -24,4 +24,8 @@ stdenv.mkDerivation rec {
     platforms = stdenv.lib.platforms.unix;
     maintainers = [ ];
   };
-}
+} // stdenv.lib.optionalAttrs stdenv.hostPlatform.isMusl {
+  # This patch should be applied unconditionally, but doing so will cause mass rebuild.
+  patches = ./fix-includes.patch;
+})
+
diff --git a/pkgs/development/libraries/libdaemon/fix-includes.patch b/pkgs/development/libraries/libdaemon/fix-includes.patch
new file mode 100644
index 00000000000..51c5133afed
--- /dev/null
+++ b/pkgs/development/libraries/libdaemon/fix-includes.patch
@@ -0,0 +1,13 @@
+--- libdaemon-0.14.orig/examples/testd.c
++++ libdaemon-0.14/examples/testd.c
+@@ -21,9 +21,9 @@
+ #include <signal.h>
+ #include <errno.h>
+ #include <string.h>
++#include <unistd.h>
+ #include <sys/types.h>
+ #include <sys/time.h>
+-#include <sys/unistd.h>
+ #include <sys/select.h>
+ 
+ #include <libdaemon/dfork.h>