summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta-oe/recipes-support/daemontools/daemontools/0001-Fix-signature-of-main-function.patch209
-rw-r--r--meta-oe/recipes-support/daemontools/daemontools/warnings.patch74
-rw-r--r--meta-oe/recipes-support/daemontools/daemontools_0.76.bb4
3 files changed, 287 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/daemontools/daemontools/0001-Fix-signature-of-main-function.patch b/meta-oe/recipes-support/daemontools/daemontools/0001-Fix-signature-of-main-function.patch
new file mode 100644
index 0000000000..19f0ae7f21
--- /dev/null
+++ b/meta-oe/recipes-support/daemontools/daemontools/0001-Fix-signature-of-main-function.patch
@@ -0,0 +1,209 @@
1From 269f18d5e6698fdd34fec2798f10c6fe072f3cd5 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Thu, 1 Sep 2022 23:36:52 -0700
4Subject: [PATCH] Fix signature of main function
5
6Clang-15 errors out otherewise.
7Include needed headers for missing functions
8
9Upstream-Status:Pending
10Signed-off-by: Khem Raj <raj.khem@gmail.com>
11---
12 src/chkshsgr.c | 2 +-
13 src/tai64n.c | 2 +-
14 src/tai64nlocal.c | 2 +-
15 src/trycpp.c | 5 +++--
16 src/tryflock.c | 4 ++--
17 src/trymkffo.c | 2 +-
18 src/trypoll.c | 3 ++-
19 src/trysgact.c | 4 ++--
20 src/trysgprm.c | 4 ++--
21 src/tryshsgr.c | 3 ++-
22 src/tryulong64.c | 4 ++--
23 src/trywaitp.c | 4 ++--
24 src/x86cpuid.c | 2 +-
25 13 files changed, 22 insertions(+), 19 deletions(-)
26
27diff --git a/src/chkshsgr.c b/src/chkshsgr.c
28index 038afe9..9547a4c 100644
29--- a/src/chkshsgr.c
30+++ b/src/chkshsgr.c
31@@ -5,7 +5,7 @@
32 #include <grp.h>
33 #include <unistd.h>
34
35-int main()
36+int main(int argc, char *argv[])
37 {
38 gid_t x[4];
39
40diff --git a/src/tai64n.c b/src/tai64n.c
41index 17bdb82..7096ab3 100644
42--- a/src/tai64n.c
43+++ b/src/tai64n.c
44@@ -27,7 +27,7 @@ buffer in = BUFFER_INIT(myread,0,inbuf,sizeof inbuf);
45
46 char stamp[TIMESTAMP + 1];
47
48-int main()
49+int main(int argc, char *argv[])
50 {
51 char ch;
52
53diff --git a/src/tai64nlocal.c b/src/tai64nlocal.c
54index ce16ad8..2435737 100644
55--- a/src/tai64nlocal.c
56+++ b/src/tai64nlocal.c
57@@ -28,7 +28,7 @@ unsigned long nanosecs;
58 unsigned long u;
59 struct tm *t;
60
61-int main()
62+int main(int argc, char *argv[])
63 {
64 char ch;
65
66diff --git a/src/trycpp.c b/src/trycpp.c
67index e4503d4..d96c955 100644
68--- a/src/trycpp.c
69+++ b/src/trycpp.c
70@@ -1,6 +1,7 @@
71 /* Public domain. */
72-
73-int main()
74+#include <stdio.h>
75+#include <stdlib.h>
76+int main(int argc, char *argv[])
77 {
78 #ifdef NeXT
79 printf("nextstep\n"); exit(0);
80diff --git a/src/tryflock.c b/src/tryflock.c
81index a82ffc2..5ca97d3 100644
82--- a/src/tryflock.c
83+++ b/src/tryflock.c
84@@ -3,8 +3,8 @@
85 #include <sys/types.h>
86 #include <sys/file.h>
87 #include <fcntl.h>
88-
89-main()
90+void
91+main(int argc, char *argv[])
92 {
93 flock(0,LOCK_EX | LOCK_UN | LOCK_NB);
94 }
95diff --git a/src/trymkffo.c b/src/trymkffo.c
96index 9356342..f92414a 100644
97--- a/src/trymkffo.c
98+++ b/src/trymkffo.c
99@@ -3,7 +3,7 @@
100 #include <sys/types.h>
101 #include <sys/stat.h>
102
103-void main()
104+void main(int argc, char *argv[])
105 {
106 mkfifo("temp-trymkffo",0);
107 }
108diff --git a/src/trypoll.c b/src/trypoll.c
109index 6506617..cb888cc 100644
110--- a/src/trypoll.c
111+++ b/src/trypoll.c
112@@ -3,8 +3,9 @@
113 #include <sys/types.h>
114 #include <fcntl.h>
115 #include <poll.h>
116+#include <unistd.h>
117
118-int main()
119+int main(int argc, char *argv[])
120 {
121 struct pollfd x;
122
123diff --git a/src/trysgact.c b/src/trysgact.c
124index e264ef2..25da013 100644
125--- a/src/trysgact.c
126+++ b/src/trysgact.c
127@@ -1,8 +1,8 @@
128 /* Public domain. */
129
130 #include <signal.h>
131-
132-main()
133+void
134+main(int argc, char *argv[])
135 {
136 struct sigaction sa;
137 sa.sa_handler = 0;
138diff --git a/src/trysgprm.c b/src/trysgprm.c
139index a46c82c..5a9491c 100644
140--- a/src/trysgprm.c
141+++ b/src/trysgprm.c
142@@ -1,8 +1,8 @@
143 /* Public domain. */
144
145 #include <signal.h>
146-
147-main()
148+void
149+main(int argc, char *argv[])
150 {
151 sigset_t ss;
152
153diff --git a/src/tryshsgr.c b/src/tryshsgr.c
154index c5ed6d6..d111e40 100644
155--- a/src/tryshsgr.c
156+++ b/src/tryshsgr.c
157@@ -1,6 +1,7 @@
158 /* Public domain. */
159
160-int main()
161+#include <unistd.h>
162+int main(int argc, char *argv[])
163 {
164 short x[4];
165
166diff --git a/src/tryulong64.c b/src/tryulong64.c
167index 003548a..20a3a40 100644
168--- a/src/tryulong64.c
169+++ b/src/tryulong64.c
170@@ -1,6 +1,6 @@
171 /* Public domain. */
172-
173-int main()
174+#include <unistd.h>
175+int main(int argc, char *argv[])
176 {
177 unsigned long u;
178 u = 1;
179diff --git a/src/trywaitp.c b/src/trywaitp.c
180index 319b81f..90bc5aa 100644
181--- a/src/trywaitp.c
182+++ b/src/trywaitp.c
183@@ -2,8 +2,8 @@
184
185 #include <sys/types.h>
186 #include <sys/wait.h>
187-
188-main()
189+void
190+main(int argc, char *argv[])
191 {
192 waitpid(0,0,0);
193 }
194diff --git a/src/x86cpuid.c b/src/x86cpuid.c
195index f81c593..1cb1ea6 100644
196--- a/src/x86cpuid.c
197+++ b/src/x86cpuid.c
198@@ -7,7 +7,7 @@ void nope()
199 exit(1);
200 }
201
202-int main()
203+int main(int argc, char *argv[])
204 {
205 unsigned long x[4];
206 unsigned long y[4];
207--
2082.37.3
209
diff --git a/meta-oe/recipes-support/daemontools/daemontools/warnings.patch b/meta-oe/recipes-support/daemontools/daemontools/warnings.patch
new file mode 100644
index 0000000000..2fd18f6f1c
--- /dev/null
+++ b/meta-oe/recipes-support/daemontools/daemontools/warnings.patch
@@ -0,0 +1,74 @@
1Fixup misc warnings
2
3Patch by RiverRat
4
5http://bugs.gentoo.org/124487
6
7--- a/src/chkshsgr.c
8+++ b/src/chkshsgr.c
9@@ -1,10 +1,13 @@
10 /* Public domain. */
11
12+#include <sys/types.h>
13+#include <stdlib.h>
14+#include <grp.h>
15 #include <unistd.h>
16
17 int main()
18 {
19- short x[4];
20+ gid_t x[4];
21
22 x[0] = x[1] = 0;
23 if (getgroups(1,x) == 0) if (setgroups(1,x) == -1) _exit(1);
24--- a/src/matchtest.c
25+++ b/src/matchtest.c
26@@ -1,3 +1,4 @@
27+#include <unistd.h>
28 #include "match.h"
29 #include "buffer.h"
30 #include "str.h"
31--- a/src/multilog.c
32+++ b/src/multilog.c
33@@ -1,3 +1,4 @@
34+#include <stdio.h>
35 #include <unistd.h>
36 #include <sys/types.h>
37 #include <sys/stat.h>
38--- a/src/prot.c
39+++ b/src/prot.c
40@@ -1,5 +1,8 @@
41 /* Public domain. */
42
43+#include <sys/types.h>
44+#include <unistd.h>
45+#include <grp.h>
46 #include "hasshsgr.h"
47 #include "prot.h"
48
49--- a/src/seek_set.c
50+++ b/src/seek_set.c
51@@ -1,6 +1,7 @@
52 /* Public domain. */
53
54 #include <sys/types.h>
55+#include <unistd.h>
56 #include "seek.h"
57
58 #define SET 0 /* sigh */
59--- a/src/supervise.c
60+++ b/src/supervise.c
61@@ -1,3 +1,4 @@
62+#include <stdio.h>
63 #include <unistd.h>
64 #include <sys/types.h>
65 #include <sys/stat.h>
66--- a/src/pathexec_run.c
67+++ b/src/pathexec_run.c
68@@ -1,5 +1,6 @@
69 /* Public domain. */
70
71+#include <unistd.h>
72 #include "error.h"
73 #include "stralloc.h"
74 #include "str.h"
diff --git a/meta-oe/recipes-support/daemontools/daemontools_0.76.bb b/meta-oe/recipes-support/daemontools/daemontools_0.76.bb
index ed73408cdb..a35b54e3bc 100644
--- a/meta-oe/recipes-support/daemontools/daemontools_0.76.bb
+++ b/meta-oe/recipes-support/daemontools/daemontools_0.76.bb
@@ -15,11 +15,15 @@ SECTION = "System/Servers"
15LIC_FILES_CHKSUM = "file://src/prot.c;beginline=1;endline=1;md5=96964cadf07e8f8c1e2ffb3b507dd647" 15LIC_FILES_CHKSUM = "file://src/prot.c;beginline=1;endline=1;md5=96964cadf07e8f8c1e2ffb3b507dd647"
16LICENSE = "PD" 16LICENSE = "PD"
17 17
18DEPENDS += "coreutils"
19
18SRC_URI = "http://cr.yp.to/daemontools/${BPN}-${PV}.tar.gz \ 20SRC_URI = "http://cr.yp.to/daemontools/${BPN}-${PV}.tar.gz \
19 file://0001-error.h-include-errno.h-instead-of-extern-int.diff \ 21 file://0001-error.h-include-errno.h-instead-of-extern-int.diff \
20 file://0002-supervise.c-.-supervise-may-be-a-symlink-if-it-s-da.diff \ 22 file://0002-supervise.c-.-supervise-may-be-a-symlink-if-it-s-da.diff \
21 file://cross-compile.patch \ 23 file://cross-compile.patch \
22 file://0001-daemontools-Fix-QA-Issue.patch \ 24 file://0001-daemontools-Fix-QA-Issue.patch \
25 file://warnings.patch \
26 file://0001-Fix-signature-of-main-function.patch \
23" 27"
24 28
25SRC_URI[md5sum] = "1871af2453d6e464034968a0fbcb2bfc" 29SRC_URI[md5sum] = "1871af2453d6e464034968a0fbcb2bfc"