Module Name: src
Committed By: christos
Date: Thu Feb 16 19:11:13 UTC 2017
Modified Files:
src/usr.sbin/makefs/ffs: buf.h
Log Message:
fix msdos reproducible builds!
To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/usr.sbin/makefs/ffs/buf.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.sbin/makefs/ffs/buf.h
diff -u src/usr.sbin/makefs/ffs/buf.h:1.10 src/usr.sbin/makefs/ffs/buf.h:1.11
--- src/usr.sbin/makefs/ffs/buf.h:1.10 Sun Mar 29 01:52:59 2015
+++ src/usr.sbin/makefs/ffs/buf.h Thu Feb 16 14:11:13 2017
@@ -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 @@ struct buf * getblk(struct vnode *, dadd
#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