mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 08:43:19 -04:00
makefs: sync -T timestamp with NetBSD
NetBSD revision: makefs.c 1.51 Obtained from: NetBSD
This commit is contained in:
parent
6327b0d287
commit
f490b9b3bf
1 changed files with 4 additions and 1 deletions
|
|
@ -112,10 +112,13 @@ main(int argc, char *argv[])
|
|||
fstype->prepare_options(&fsoptions);
|
||||
|
||||
specfile = NULL;
|
||||
#ifdef CLOCK_REALTIME
|
||||
ch = clock_gettime(CLOCK_REALTIME, &start_time);
|
||||
#else
|
||||
ch = gettimeofday(&start, NULL);
|
||||
start_time.tv_sec = start.tv_sec;
|
||||
start_time.tv_nsec = start.tv_usec * 1000;
|
||||
|
||||
#endif
|
||||
if (ch == -1)
|
||||
err(1, "Unable to get system time");
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue