Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 14 Mar 2017 18:08:33 +0000 (UTC)
From:      Ed Maste <emaste@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r315276 - head/usr.sbin/makefs
Message-ID:  <201703141808.v2EI8X6c072386@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: emaste
Date: Tue Mar 14 18:08:32 2017
New Revision: 315276
URL: https://svnweb.freebsd.org/changeset/base/315276

Log:
  makefs: sync -T timestamp with NetBSD
  
  NetBSD revision:
  makefs.c	1.51
  
  Obtained from:	NetBSD

Modified:
  head/usr.sbin/makefs/makefs.c

Modified: head/usr.sbin/makefs/makefs.c
==============================================================================
--- head/usr.sbin/makefs/makefs.c	Tue Mar 14 17:56:36 2017	(r315275)
+++ head/usr.sbin/makefs/makefs.c	Tue Mar 14 18:08:32 2017	(r315276)
@@ -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");
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201703141808.v2EI8X6c072386>