From f08782f0923d11227983a352c26301cf703383cf Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Mon, 8 Oct 2001 00:33:45 +0000 Subject: [PATCH] 1031. [bug] libbind.a: isc__gettimeofday() infinite recursion. [RT #1858] --- CHANGES | 2 ++ lib/bind/bsd/gettimeofday.c | 4 ++-- lib/bind/port_after.h.in | 4 ++++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index 0f517f3cb5..4707ce2043 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,5 @@ +1031. [bug] libbind.a: isc__gettimeofday() infinite recursion. + [RT #1858] 1030. [bug] On systems with no resolv.conf file, nsupdate exited with an error rather than defaulting diff --git a/lib/bind/bsd/gettimeofday.c b/lib/bind/bsd/gettimeofday.c index c6415aa934..ba7b21525d 100644 --- a/lib/bind/bsd/gettimeofday.c +++ b/lib/bind/bsd/gettimeofday.c @@ -1,9 +1,8 @@ #ifndef LINT -static const char rcsid[] = "$Id: gettimeofday.c,v 1.1 2001/03/29 06:30:32 marka Exp $"; +static const char rcsid[] = "$Id: gettimeofday.c,v 1.2 2001/10/08 00:33:45 marka Exp $"; #endif #include "port_before.h" -#undef gettimeofday #include #include #include @@ -21,6 +20,7 @@ int isc__gettimeofday(struct timeval *tp, struct timezone *tzp) { int res; +#undef gettimeofday res = gettimeofday(tp, tzp); if (res < 0) return (res); diff --git a/lib/bind/port_after.h.in b/lib/bind/port_after.h.in index 8c7df1b794..f396093b46 100644 --- a/lib/bind/port_after.h.in +++ b/lib/bind/port_after.h.in @@ -335,7 +335,11 @@ int setpassent(int stayopen); #endif #define gettimeofday isc__gettimeofday +#ifdef NEED_GETTIMEOFDAY +int isc__gettimeofday(struct timeval *tvp, struct _TIMEZONE *tzp); +#else int isc__gettimeofday(struct timeval *tp, struct timezone *tzp); +#endif int getnetgrent(const char **machinep, const char **userp, const char **domainp);