From: Mark Andrews Date: Sat, 10 Apr 2004 03:47:09 +0000 (+0000) Subject: pullup from BIND 8 X-Git-Tag: v9.2.3rc4^3~86 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=e76c2e04a4e70584d5a3955240adeb30fa8453fb;p=thirdparty%2Fbind9.git pullup from BIND 8 1657. [bug] gmtime_r() called incorrectly. --- diff --git a/lib/bind/resolv/res_debug.c b/lib/bind/resolv/res_debug.c index e18214f9b74..cc67f1e3b1e 100644 --- a/lib/bind/resolv/res_debug.c +++ b/lib/bind/resolv/res_debug.c @@ -95,7 +95,7 @@ #if defined(LIBC_SCCS) && !defined(lint) static const char sccsid[] = "@(#)res_debug.c 8.1 (Berkeley) 6/4/93"; -static const char rcsid[] = "$Id: res_debug.c,v 1.10 2004/03/18 02:58:01 marka Exp $"; +static const char rcsid[] = "$Id: res_debug.c,v 1.11 2004/04/10 03:47:09 marka Exp $"; #endif /* LIBC_SCCS and not lint */ #include "port_before.h" @@ -1099,9 +1099,10 @@ p_secstodate (u_long secs) { static char output[15]; /* YYYYMMDDHHMMSS and null */ time_t clock = secs; struct tm *time; - #ifdef HAVE_TIME_R - gmtime_r(&clock, &time); + struct tm res; + + time = gmtime_r(&clock, &res); #else time = gmtime(&clock); #endif