blob: 8192056d131cc002539b8b24bcd7c96a8a1c1e2f [file] [log] [blame]
Brad Bishop316dfdd2018-06-25 12:45:53 -04001From f567740cf64978ac9db014c786b6d0267b244f33 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sun, 4 Mar 2018 22:30:30 -0800
4Subject: [PATCH 1/2] replace SIGCLD with SIGCHLD and include sys/types.h
5
6Fixes
7main.c:129:10: error: 'SIGCLD' undeclared (first use in this function); did you mean 'SIGCHLD'?
8 signal(SIGCLD, sig_child);
9 ^~~~~~
10 SIGCHLD
11
12main.c:125:2: warning: implicit declaration of function 'umask' [-Wimplicit-function-declaration]
13 umask(0);
14 ^~~~~
15
16Signed-off-by: Khem Raj <raj.khem@gmail.com>
17---
18Upstream-Status: Pending
19
20 src/main.c | 5 +++--
21 1 file changed, 3 insertions(+), 2 deletions(-)
22
23diff --git a/src/main.c b/src/main.c
24index 3cf4072..cd34196 100644
25--- a/src/main.c
26+++ b/src/main.c
27@@ -31,6 +31,7 @@
28 #include <sys/ioctl.h>
29 #include <sys/wait.h>
30 #include <sys/param.h>
31+#include <sys/types.h>
32 #include <pthread.h>
33 #include <fcntl.h>
34 #include <unistd.h>
35@@ -126,9 +127,9 @@ static void daemon_start(int ignsigcld)
36
37 if (ignsigcld) {
38 #ifdef SIGTSTP
39- signal(SIGCLD, sig_child);
40+ signal(SIGCHLD, sig_child);
41 #else
42- signal(SIGCLD, SIG_IGN);
43+ signal(SIGCHLD, SIG_IGN);
44 #endif
45 }
46 }
47--
482.16.2
49