aboutsummaryrefslogtreecommitdiff
path: root/sbin/newfs_msdos/newfs_msdos.c
diff options
context:
space:
mode:
authorBruce Evans <bde@FreeBSD.org>1998-10-17 12:44:55 +0000
committerBruce Evans <bde@FreeBSD.org>1998-10-17 12:44:55 +0000
commitb5bd72112d0f952b2d2be85f60f52270b22f5104 (patch)
treee9a9c7a9e0154d115b04d52ebd678d2062d6bb66 /sbin/newfs_msdos/newfs_msdos.c
parent359b52339267b9620365eff0576231dca383044a (diff)
downloadsrc-b5bd72112d0f952b2d2be85f60f52270b22f5104.tar.gz
src-b5bd72112d0f952b2d2be85f60f52270b22f5104.zip
Don't assume that time_t is long.
Notes
Notes: svn path=/head/; revision=40487
Diffstat (limited to 'sbin/newfs_msdos/newfs_msdos.c')
-rw-r--r--sbin/newfs_msdos/newfs_msdos.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sbin/newfs_msdos/newfs_msdos.c b/sbin/newfs_msdos/newfs_msdos.c
index c4d4703a605a..85a1d7faa350 100644
--- a/sbin/newfs_msdos/newfs_msdos.c
+++ b/sbin/newfs_msdos/newfs_msdos.c
@@ -27,7 +27,7 @@
#ifndef lint
static const char rcsid[] =
- "$Id: newfs_msdos.c,v 1.3 1998/07/16 12:24:51 rnordier Exp $";
+ "$Id: newfs_msdos.c,v 1.4 1998/07/19 15:02:39 rnordier Exp $";
#endif /* not lint */
#include <sys/param.h>
@@ -243,6 +243,7 @@ main(int argc, char *argv[])
u_int8_t *img;
const char *fname, *dtype, *bname;
ssize_t n;
+ time_t now;
u_int fat, bss, rds, cls, dir, lsn, x, x1, x2;
int ch, fd, fd1;
@@ -541,7 +542,8 @@ main(int argc, char *argv[])
print_bpb(&bpb);
if (!opt_N) {
gettimeofday(&tv, NULL);
- tm = localtime(&tv.tv_sec);
+ now = tv.tv_sec;
+ tm = localtime(&now);
if (!(img = malloc(bpb.bps)))
err(1, NULL);
dir = bpb.res + (bpb.spf ? bpb.spf : bpb.bspf) * bpb.nft;