makefs: sync -T timestamp with NetBSD
NetBSD revision: makefs.c 1.51 Obtained from: NetBSD
This commit is contained in:
parent
d6f9c748a9
commit
fbc7088a82
@ -112,10 +112,13 @@ main(int argc, char *argv[])
|
|||||||
fstype->prepare_options(&fsoptions);
|
fstype->prepare_options(&fsoptions);
|
||||||
|
|
||||||
specfile = NULL;
|
specfile = NULL;
|
||||||
|
#ifdef CLOCK_REALTIME
|
||||||
|
ch = clock_gettime(CLOCK_REALTIME, &start_time);
|
||||||
|
#else
|
||||||
ch = gettimeofday(&start, NULL);
|
ch = gettimeofday(&start, NULL);
|
||||||
start_time.tv_sec = start.tv_sec;
|
start_time.tv_sec = start.tv_sec;
|
||||||
start_time.tv_nsec = start.tv_usec * 1000;
|
start_time.tv_nsec = start.tv_usec * 1000;
|
||||||
|
#endif
|
||||||
if (ch == -1)
|
if (ch == -1)
|
||||||
err(1, "Unable to get system time");
|
err(1, "Unable to get system time");
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user