daemonize: fix build (#476400)
This commit is contained in:
@@ -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 <stdio.h>
|
||||
/* We're ANSI now; we're guaranteed to have strchr(). */
|
||||
#include <string.h>
|
||||
+#include <unistd.h>
|
||||
|
||||
#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]));\
|
||||
@@ -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/";
|
||||
|
||||
Reference in New Issue
Block a user