summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2013-04-02 04:58:54 +0000
committerderaadt <deraadt@openbsd.org>2013-04-02 04:58:54 +0000
commit1acf53045760b6e6c9273b8491938d03092beb4e (patch)
treec631529c5fcaf6fb4f6cd7dde944c0ea6cf8b5a7
parenthandle large time_t in DEBUG code (diff)
downloadwireguard-openbsd-1acf53045760b6e6c9273b8491938d03092beb4e.tar.xz
wireguard-openbsd-1acf53045760b6e6c9273b8491938d03092beb4e.zip
handle larger time_t
ok guenther
-rw-r--r--usr.bin/ranlib/touch.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/ranlib/touch.c b/usr.bin/ranlib/touch.c
index be658c708f0..17fc4dc6753 100644
--- a/usr.bin/ranlib/touch.c
+++ b/usr.bin/ranlib/touch.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: touch.c,v 1.7 2009/10/27 23:59:42 deraadt Exp $ */
+/* $OpenBSD: touch.c,v 1.8 2013/04/02 04:58:54 deraadt Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@@ -75,7 +75,7 @@ settime(int afd)
if (lseek(afd, size, SEEK_SET) == (off_t)-1)
error(archive);
(void)snprintf(buf, sizeof buf,
- "%-12ld", (long int)time((time_t *)NULL) + RANLIBSKEW);
+ "%-12lld", (long long)time((time_t *)NULL) + RANLIBSKEW);
if (write(afd, buf, sizeof(hdr->ar_date)) != sizeof(hdr->ar_date))
error(archive);
}