diff options
author | Ed Maste <emaste@FreeBSD.org> | 2017-03-14 18:08:32 +0000 |
---|---|---|
committer | Ed Maste <emaste@FreeBSD.org> | 2017-03-14 18:08:32 +0000 |
commit | f490b9b3bf895d69a078caa5df88f2c4dd1d1683 (patch) | |
tree | 9e68fd8b9a38cea33911b561145d09930301109a /usr.sbin/makefs/makefs.c | |
parent | 6327b0d287ef60958c80f92f5c69e46a6d29e0a1 (diff) | |
download | src-f490b9b3bf895d69a078caa5df88f2c4dd1d1683.tar.gz src-f490b9b3bf895d69a078caa5df88f2c4dd1d1683.zip |
makefs: sync -T timestamp with NetBSD
NetBSD revision:
makefs.c 1.51
Obtained from: NetBSD
Notes
Notes:
svn path=/head/; revision=315276
Diffstat (limited to 'usr.sbin/makefs/makefs.c')
-rw-r--r-- | usr.sbin/makefs/makefs.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.sbin/makefs/makefs.c b/usr.sbin/makefs/makefs.c index b3ae7e0136e0..10c7472c13db 100644 --- a/usr.sbin/makefs/makefs.c +++ b/usr.sbin/makefs/makefs.c @@ -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"); |