From: Kurt Zeilenga Date: Fri, 10 Oct 2014 18:56:31 +0000 (-0700) Subject: Fix pointer incompatibility issue on some platforms X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=a1e3b1cf3c5991ef550f608ee816e9274e547dda;p=openldap Fix pointer incompatibility issue on some platforms Don't assume tv_sec is a time_t. --- diff --git a/libraries/libldap/result.c b/libraries/libldap/result.c index 71b6f0e9d0..b366ce8e01 100644 --- a/libraries/libldap/result.c +++ b/libraries/libldap/result.c @@ -273,7 +273,7 @@ wait4msg( #ifdef HAVE_GETTIMEOFDAY gettimeofday( &start_time_tv, NULL ); #else /* ! HAVE_GETTIMEOFDAY */ - time( &start_time_tv.tv_sec ); + start_time_tv.tv_sec = time( NULL ); start_time_tv.tv_usec = 0; #endif /* ! HAVE_GETTIMEOFDAY */ } @@ -387,7 +387,7 @@ wait4msg( #ifdef HAVE_GETTIMEOFDAY gettimeofday( &curr_time_tv, NULL ); #else /* ! HAVE_GETTIMEOFDAY */ - time( &curr_time_tv.tv_sec ); + start_time_tv.tv_sec = time( NULL ); curr_time_tv.tv_usec = 0; #endif /* ! HAVE_GETTIMEOFDAY */