CRUX-ARM : Home

Home :: Documentation :: Download :: Development :: Community :: Ports :: Packages :: Bugs :: Links :: About :: Donors
start-stop-daemon: updated to 20170812
[crossrootfs.git] / start-stop-daemon / crux-patch.diff
CommitLineData
487cc3be 1diff --git a/start-stop-daemon/start-stop-daemon.8 b/start-stop-daemon/start-stop-daemon.8
c653e22c 2index de2d35c3..de666e65 100644
487cc3be
VM
3--- a/start-stop-daemon/start-stop-daemon.8
4+++ b/start-stop-daemon/start-stop-daemon.8
5@@ -20,7 +20,7 @@
6 .\" You should have received a copy of the GNU General Public License
7 .\" along with this program. If not, see <https://www.gnu.org/licenses/>.
8 .
c653e22c
VM
9-.TH start\-stop\-daemon 8 "2017-07-04" "Debian Project" "dpkg suite"
10+.TH start\-stop\-daemon 8 "2017-08-12" "CRUX 3.3" "core services"
11 .nh
487cc3be
VM
12 .SH NAME
13 start\-stop\-daemon \- start and stop system daemon programs
487cc3be 14diff --git a/start-stop-daemon/start-stop-daemon.c b/start-stop-daemon/start-stop-daemon.c
c653e22c 15index 81357504..f586fd91 100644
487cc3be
VM
16--- a/start-stop-daemon/start-stop-daemon.c
17+++ b/start-stop-daemon/start-stop-daemon.c
18@@ -20,10 +20,34 @@
19 * Changes by Ian Jackson: added --retry (and associated rearrangements).
20 */
21
22+#if 0
23 #include <config.h>
24 #include <compat.h>
25
26 #include <dpkg/macros.h>
27+#else
c653e22c
VM
28+# define VERSION "20170812"
29+# define CRUX "CRUX 3.3"
487cc3be
VM
30+
31+# define HAVE_SYS_PARAM_H
32+# define HAVE_SYS_SYSCALL_H
33+# define HAVE_SYS_SYSCTL_H
34+# define HAVE_SYS_USER_H
35+# define HAVE_STDDEF_H
36+# define HAVE_ERROR_H
37+# define HAVE_ERR_H
38+
39+# define HAVE_CLOCK_MONOTONIC
40+# define HAVE_GETDTABLESIZE
41+# define HAVE_IOPRIO_SET
42+# define HAVE_SETSID
43+
44+# define DPKG_ATTR_NORET __attribute__((noreturn))
45+# define DPKG_ATTR_PRINTF(X)
46+
47+# define _GNU_SOURCE
48+# include <unistd.h>
49+#endif
50
c653e22c
VM
51 #if defined(__linux__)
52 # define OS_Linux
53@@ -159,6 +183,10 @@
487cc3be
VM
54 #define HAVE_IOPRIO_SET
55 #endif
56
57+#ifndef array_count
58+# define array_count(x) (sizeof(x) / sizeof((x)[0]))
59+#endif
60+
61 #define IOPRIO_CLASS_SHIFT 13
62 #define IOPRIO_PRIO_VALUE(class, prio) (((class) << IOPRIO_CLASS_SHIFT) | (prio))
63 #define IO_SCHED_PRIO_MIN 0
c653e22c 64@@ -327,8 +355,7 @@ xstrndup(const char *str, size_t n)
487cc3be
VM
65 static void
66 timespec_gettime(struct timespec *ts)
67 {
68-#if defined(_POSIX_TIMERS) && _POSIX_TIMERS > 0 && \
69- defined(_POSIX_MONOTONIC_CLOCK) && _POSIX_MONOTONIC_CLOCK > 0
70+#ifdef HAVE_CLOCK_MONOTONIC
71 if (clock_gettime(CLOCK_MONOTONIC, ts) < 0)
72 fatal("clock_gettime failed");
73 #else
c653e22c 74@@ -646,9 +673,9 @@ usage(void)
487cc3be
VM
75 static void
76 do_version(void)
77 {
78- printf("start-stop-daemon %s for Debian\n\n", VERSION);
79-
80- printf("Written by Marek Michalkiewicz, public domain.\n");
81+ printf("start-stop-daemon " VERSION " for " CRUX "\n\n"
82+ "Written by Marek Michalkiewicz, public domain.\n"
83+ "Adjusted for " CRUX ".\n");
84 }
85
86 static void DPKG_ATTR_NORET