libdaemon: Add patch to fix musl build

This commit is contained in:
Will Dietz 2017-05-27 18:40:27 -05:00
parent e2ef21d9b5
commit 0153599164
2 changed files with 19 additions and 2 deletions

View File

@ -1,6 +1,6 @@
{stdenv, fetchurl}: {stdenv, fetchurl}:
stdenv.mkDerivation rec { stdenv.mkDerivation (rec {
name = "libdaemon-0.14"; name = "libdaemon-0.14";
src = fetchurl { src = fetchurl {
@ -24,4 +24,8 @@ stdenv.mkDerivation rec {
platforms = stdenv.lib.platforms.unix; platforms = stdenv.lib.platforms.unix;
maintainers = [ ]; maintainers = [ ];
}; };
} } // stdenv.lib.optionalAttrs stdenv.hostPlatform.isMusl {
# This patch should be applied unconditionally, but doing so will cause mass rebuild.
patches = ./fix-includes.patch;
})

View File

@ -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>