summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorchristos <christos@NetBSD.org>2008-12-28 18:34:58 +0000
committerchristos <christos@NetBSD.org>2008-12-28 18:34:58 +0000
commit3ff2f379f67abfdd3c2a2250f4fdeb259657ecbf (patch)
treed94c850ecc7548ef89e908f3a69ac89dfa85d59e /usr.bin
parent644d31b98769b70b19a5d189defb9032ad84dc86 (diff)
In the "tool" case, pretend we don't have futimes because there is no visible
prototype for futimes without _NETBSD_SOURCE being defined. When we will do a __RENAME() in futimes this will not work. XXX: This is a hack, better ideas welcome.
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/xinstall/xinstall.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/usr.bin/xinstall/xinstall.c b/usr.bin/xinstall/xinstall.c
index ca86ba10579..655e352b42e 100644
--- a/usr.bin/xinstall/xinstall.c
+++ b/usr.bin/xinstall/xinstall.c
@@ -1,4 +1,4 @@
-/* $NetBSD: xinstall.c,v 1.103 2008/07/21 14:19:28 lukem Exp $ */
+/* $NetBSD: xinstall.c,v 1.104 2008/12/28 18:34:58 christos Exp $ */
/*
* Copyright (c) 1987, 1993
@@ -31,6 +31,9 @@
#if HAVE_NBTOOL_CONFIG_H
#include "nbtool_config.h"
+#ifdef __NetBSD__
+#undef HAVE_FUTIMES
+#endif
#else
#define HAVE_FUTIMES 1
#define HAVE_STRUCT_STAT_ST_FLAGS 1
@@ -46,7 +49,7 @@ __COPYRIGHT("@(#) Copyright (c) 1987, 1993\
#if 0
static char sccsid[] = "@(#)xinstall.c 8.1 (Berkeley) 7/21/93";
#else
-__RCSID("$NetBSD: xinstall.c,v 1.103 2008/07/21 14:19:28 lukem Exp $");
+__RCSID("$NetBSD: xinstall.c,v 1.104 2008/12/28 18:34:58 christos Exp $");
#endif
#endif /* not lint */
@@ -55,6 +58,7 @@ __RCSID("$NetBSD: xinstall.c,v 1.103 2008/07/21 14:19:28 lukem Exp $");
#include <sys/mman.h>
#include <sys/stat.h>
#include <sys/wait.h>
+#include <sys/time.h>
#include <ctype.h>
#include <err.h>
@@ -1098,7 +1102,8 @@ metadata_log(const char *path, const char *type, struct timeval *tv,
if (tags)
fprintf(metafp, " tags=%s", tags);
if (tv != NULL && dopreserve)
- fprintf(metafp, " time=%ld.%ld", tv[1].tv_sec, tv[1].tv_usec);
+ fprintf(metafp, " time=%lld.%ld",
+ (long long)tv[1].tv_sec, (long)tv[1].tv_usec);
if (digestresult && digest)
fprintf(metafp, " %s=%s", digest, digestresult);
fputc('\n', metafp);