diff --git a/pkgs/by-name/da/daemonize/include-write-prototype.patch b/pkgs/by-name/da/daemonize/include-write-prototype.patch new file mode 100644 index 000000000000..21652c9f53cd --- /dev/null +++ b/pkgs/by-name/da/daemonize/include-write-prototype.patch @@ -0,0 +1,15 @@ +diff --git a/getopt.c b/getopt.c +index 9b27812..3fac396 100644 +--- a/getopt.c ++++ b/getopt.c +@@ -43,9 +43,9 @@ + #include + /* We're ANSI now; we're guaranteed to have strchr(). */ + #include ++#include + + #define ERR(s, c) if(x_opterr){\ +- extern int write();\ + char errbuf[2];\ + errbuf[0] = c; errbuf[1] = '\n';\ + (void) write(2, argv[0], (unsigned)strlen(argv[0]));\ diff --git a/pkgs/by-name/da/daemonize/package.nix b/pkgs/by-name/da/daemonize/package.nix index 7f6e2f82acdb..be5daa3c708b 100644 --- a/pkgs/by-name/da/daemonize/package.nix +++ b/pkgs/by-name/da/daemonize/package.nix @@ -15,6 +15,13 @@ stdenv.mkDerivation rec { sha256 = "1e6LZXf/lK7sB2CbXwOg7LOi0Q8IBQNAa4d7rX0Ej3A="; }; + patches = [ + # conbination of: + # https://github.com/bmc/daemonize/commit/eaf4746d47e171e7b8655690eb1e91fc216f2866 + # https://github.com/bmc/daemonize/pull/39 + ./include-write-prototype.patch + ]; + meta = { description = "Runs a command as a Unix daemon"; homepage = "http://software.clapper.org/daemonize/";