summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--runit/runsv.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/runit/runsv.c b/runit/runsv.c
index ccc762d..737909b 100644
--- a/runit/runsv.c
+++ b/runit/runsv.c
@@ -55,7 +55,14 @@ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* typically requiring -lrt. We just skip all this mess */
static void gettimeofday_ns(struct timespec *ts)
{
+#if defined(__NR_clock_gettime)
syscall(__NR_clock_gettime, CLOCK_REALTIME, ts);
+#elif __TIMESIZE == 64
+ syscall(__NR_clock_gettime64, CLOCK_REALTIME, ts);
+#else
+# error "We currently don't support architectures without " \
+ "the __NR_clock_gettime syscall and 32-bit time_t"
+#endif
}
#else
static void gettimeofday_ns(struct timespec *ts)