Commit | Line | Data |
---|---|---|
487cc3be VM |
1 | diff --git a/start-stop-daemon/start-stop-daemon.8 b/start-stop-daemon/start-stop-daemon.8 |
2 | index deae6c6..28d2de8 100644 | |
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 | . | |
9 | -.TH start\-stop\-daemon 8 "2014-03-26" "Debian Project" "dpkg utilities" | |
10 | +.TH start\-stop\-daemon 8 "2015-09-21" "CRUX 3.2" "core services" | |
11 | .SH NAME | |
12 | start\-stop\-daemon \- start and stop system daemon programs | |
13 | . | |
14 | diff --git a/start-stop-daemon/start-stop-daemon.c b/start-stop-daemon/start-stop-daemon.c | |
15 | index c844f2e..67cd043 100644 | |
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 | |
28 | +# define VERSION "20150921" | |
29 | +# define CRUX "CRUX 3.2" | |
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 | ||
51 | #if defined(linux) | |
52 | # define OSLinux | |
53 | @@ -142,6 +166,10 @@ | |
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 | |
64 | @@ -310,8 +338,7 @@ xstrndup(const char *str, size_t n) | |
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 | |
74 | @@ -615,9 +642,9 @@ usage(void) | |
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 |