Commit a6b8e230 authored by Marco d'Itri's avatar Marco d'Itri

Replace CLOCK_BOOTTIME on non-Linux ports

parent 88858a89
......@@ -4,7 +4,18 @@ Inspired by https://svnweb.freebsd.org/base/head/usr.sbin/inetd/inetd.c?r1=22940
--- a/inetd.c
+++ b/inetd.c
@@ -228,7 +228,7 @@ struct servtab {
@@ -163,6 +163,10 @@
#define pledge(a, b) (0)
#endif
+#ifndef CLOCK_BOOTTIME
+#define CLOCK_BOOTTIME CLOCK_MONOTONIC
+#endif
+
#define MINIMUM(a, b) (((a) < (b)) ? (a) : (b))
#define TOOMANY 256 /* don't start more than TOOMANY */
@@ -228,7 +232,7 @@ struct servtab {
int se_ctrladdr_size;
int se_max; /* max # of instances of this service */
int se_count; /* number started since se_time */
......@@ -13,7 +24,7 @@ Inspired by https://svnweb.freebsd.org/base/head/usr.sbin/inetd/inetd.c?r1=22940
struct servtab *se_next;
struct event se_event;
} *servtab;
@@ -1873,11 +1873,11 @@ spawn(int ctrl, short events, void *xsep
@@ -1873,11 +1877,11 @@ spawn(int ctrl, short events, void *xsep
dofork = (sep->se_bi == 0 || sep->se_bi->bi_fork);
if (dofork) {
if (sep->se_count++ == 0)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment