ash: Expand here-documents in the current shell environment
[oweals/busybox.git] / libbb / time.c
index f9b8da0b3648730d031afce6545ddbbc7dce48ac..e66a9cba8438746722ff43e9eecdc9a721095205 100644 (file)
@@ -253,12 +253,10 @@ char* FAST_FUNC strftime_YYYYMMDDHHMMSS(char *buf, unsigned len, time_t *tp)
 #define CLOCK_MONOTONIC 1
 #endif
 
-/* libc has incredibly messy way of doing this,
- * typically requiring -lrt. We just skip all this mess */
 static void get_mono(struct timespec *ts)
 {
-       if (syscall(__NR_clock_gettime, CLOCK_MONOTONIC, ts))
-               bb_error_msg_and_die("clock_gettime(MONOTONIC) failed");
+       if (clock_gettime(CLOCK_MONOTONIC, ts))
+               bb_simple_error_msg_and_die("clock_gettime(MONOTONIC) failed");
 }
 unsigned long long FAST_FUNC monotonic_ns(void)
 {