aboutsummaryrefslogtreecommitdiff
path: root/runit/runsv.c
diff options
context:
space:
mode:
Diffstat (limited to 'runit/runsv.c')
-rw-r--r--runit/runsv.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/runit/runsv.c b/runit/runsv.c
index d395d4528..ecab8cdf5 100644
--- a/runit/runsv.c
+++ b/runit/runsv.c
@@ -62,12 +62,12 @@ static void gettimeofday_ns(struct timespec *ts)
62 && sizeof(((struct timeval*)ts)->tv_usec) == sizeof(ts->tv_nsec) 62 && sizeof(((struct timeval*)ts)->tv_usec) == sizeof(ts->tv_nsec)
63 ) { 63 ) {
64 /* Cheat */ 64 /* Cheat */
65 gettimeofday((void*)ts, NULL); 65 xgettimeofday((void*)ts);
66 ts->tv_nsec *= 1000; 66 ts->tv_nsec *= 1000;
67 } else { 67 } else {
68 /* For example, musl has "incompatible" layouts */ 68 /* For example, musl has "incompatible" layouts */
69 struct timeval tv; 69 struct timeval tv;
70 gettimeofday(&tv, NULL); 70 xgettimeofday(&tv);
71 ts->tv_sec = tv.tv_sec; 71 ts->tv_sec = tv.tv_sec;
72 ts->tv_nsec = tv.tv_usec * 1000; 72 ts->tv_nsec = tv.tv_usec * 1000;
73 } 73 }