openbsd-ports/net/argus/patches/patch-common_argus_util_c
steven a512336ce2 import argus 3.0.0
Argus is a fixed-model real time flow monitor designed to track and
report on the status and performance of all network transactions seen in
a data network traffic stream. Argus provides a common data format for
reporting flow metrics such as connectivity, capacity, demand, loss,
delay, and jitter on a per transaction basis. The record format that
Argus uses is flexible and extensible, supporting generic flow
identifiers and metrics, as well as application/protocol specific
information.

ok naddy@ sthen@
2008-06-30 05:19:33 +00:00

21 lines
750 B
Plaintext

$OpenBSD: patch-common_argus_util_c,v 1.1.1.1 2008/06/30 05:19:33 steven Exp $
work around reading the wrong piece of memory on sparc64.
--- common/argus_util.c.orig Wed Jun 25 07:05:41 2008
+++ common/argus_util.c Wed Jun 25 07:07:37 2008
@@ -1911,11 +1911,12 @@ print_time(struct timeval *tvp)
char timeZoneBuf[32];
char *retn = ArgusPrintTimeBuf, *ptr;
struct tm *tm, tmbuf;
+ time_t sec = (time_t) tvp->tv_sec;
bzero (timeZoneBuf, sizeof(timeZoneBuf));
bzero (ArgusPrintTimeBuf, sizeof(ArgusPrintTimeBuf));
- if ((tm = localtime_r ((time_t *)&tvp->tv_sec, &tmbuf)) != NULL) {
+ if ((tm = localtime_r (&sec, &tmbuf)) != NULL) {
if (uflag)
snprintf (retn, 32, "%9d", (int) tvp->tv_sec);
else