Re: svlogd timestamps fail on OpenBSD 5.5 (snapshot)

From: Jérémie Courrèges-Anglas <jca_at_wxcvbn.org>
Date: Tue, 29 Jul 2014 22:16:55 +0200

Hi.

This is a follow-up for a report sent by Mike in April. The problem
here is that on some platforms such as OpenBSD and NetBSD, time_t has
been enlarged to 64 bits even on ILP32. Since time_t is already used in
the runit source code I think that this diff can only make things
better.

  http://openbsd.cs.toronto.edu/cgi-bin/cvsweb/~checkout~/ports/sysutils/runit/patches/patch-src_fmt_ptime_c?rev=1.1&content-type=text/plain

Cheers,

--- src/fmt_ptime.c.orig Tue Nov 21 16:14:12 2006
+++ src/fmt_ptime.c Tue Apr 22 01:27:37 2014
_at_@ -4,7 +4,7 @@
 
 unsigned int fmt_ptime2(char *s, struct taia *ta, char sep) {
   struct tm *t;
- unsigned long u;
+ time_t u;
 
   if (ta->sec.x < 4611686018427387914ULL) return(0); /* impossible? */
   u =ta->sec.x -4611686018427387914ULL;

-- 
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE
Received on Tue Jul 29 2014 - 20:16:55 UTC

This archive was generated by hypermail 2.3.0 : Sun May 09 2021 - 19:44:18 UTC