Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.sbin/makefs/ffs fix msdos reproducible builds!



details:   https://anonhg.NetBSD.org/src/rev/48b2500c8117
branches:  trunk
changeset: 821763:48b2500c8117
user:      christos <christos%NetBSD.org@localhost>
date:      Thu Feb 16 19:11:13 2017 +0000

description:
fix msdos reproducible builds!

diffstat:

 usr.sbin/makefs/ffs/buf.h |  17 +++++++++++++++--
 1 files changed, 15 insertions(+), 2 deletions(-)

diffs (31 lines):

diff -r 9683f404d962 -r 48b2500c8117 usr.sbin/makefs/ffs/buf.h
--- a/usr.sbin/makefs/ffs/buf.h Thu Feb 16 18:50:04 2017 +0000
+++ b/usr.sbin/makefs/ffs/buf.h Thu Feb 16 19:11:13 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: buf.h,v 1.10 2015/03/29 05:52:59 agc Exp $     */
+/*     $NetBSD: buf.h,v 1.11 2017/02/16 19:11:13 christos Exp $        */
 
 /*
  * Copyright (c) 2001 Wasabi Systems, Inc.
@@ -87,7 +87,20 @@
 #define        BC_AGE          0
 
 #define min(a, b) MIN((a), (b))
-#define microtime(tv) gettimeofday((tv), NULL)
+
+static inline void
+microtime(struct timeval *tv)
+{
+       extern struct stat stampst;
+
+       if (stampst.st_ino) {
+               tv->tv_sec = stampst.st_mtime;
+               tv->tv_usec = 0;
+       } else {
+           gettimeofday((tv), NULL);
+       }
+}
+
 #define KASSERT(a)
 #define IO_SYNC        1
 



Home | Main Index | Thread Index | Old Index