openbsd-ports/net/snort/patches/patch-src_util_c

30 lines
1016 B
Plaintext

$OpenBSD: patch-src_util_c,v 1.2 2009/02/12 22:12:08 rui Exp $
--- src/util.c.orig Tue Apr 15 20:13:56 2008
+++ src/util.c Fri Aug 8 14:57:45 2008
@@ -406,12 +406,13 @@ int DisplayBanner()
* Returns: void function
*
****************************************************************************/
-void ts_print(register const struct timeval *tvp, char *timebuf)
+void ts_print(register const struct timeval32 *tvp, char *timebuf)
{
register int s;
int localzone;
time_t Time;
struct timeval tv;
+ struct timeval32 tvnow;
struct timezone tz;
struct tm *lt; /* place to stick the adjusted clock data */
@@ -421,7 +422,9 @@ void ts_print(register const struct timeval *tvp, char
/* manual page (for linux) says tz is never used, so.. */
bzero((char *) &tz, sizeof(tz));
gettimeofday(&tv, &tz);
- tvp = &tv;
+ tvnow.tv_sec = tv.tv_sec;
+ tvnow.tv_usec = tv.tv_usec;
+ tvp = &tvnow;
}
localzone = thiszone;