pkgsrc/devel/diffutils/patches/patch-ab
apb 63e5cb337b Fix a build failure on platforms where time_t is larger than long, by
using long long instead.  (Not using time_t, because there's no easy and
portable printf format for time_t.)  Bump PKGREVISION to 4.
2009-03-10 14:06:06 +00:00

16 lines
654 B
Text

$NetBSD: patch-ab,v 1.1 2009/03/10 14:06:06 apb Exp $
--- src/context.c.orig 2002-02-28 06:22:42.000000000 +0200
+++ src/context.c
@@ -61,9 +61,9 @@ print_context_label (char const *mark,
int nsec = TIMESPEC_NS (inf->stat.st_mtim);
if (! (tm && nstrftime (buf, sizeof buf, time_format, tm, 0, nsec)))
{
- long sec = inf->stat.st_mtime;
+ long long sec = inf->stat.st_mtime; /* should really be time_t */
verify (info_preserved, sizeof inf->stat.st_mtime <= sizeof sec);
- sprintf (buf, "%ld.%.9d", sec, nsec);
+ sprintf (buf, "%lld.%.9d", sec, nsec);
}
fprintf (outfile, "%s %s\t%s\n", mark, inf->name, buf);
}