From 2d16057093406d520de0fe3d369d8b4e304165f8 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Fri, 10 Oct 2014 11:56:31 -0700 Subject: [PATCH] Fix pointer incompatibility issue on some platforms Don't assume tv_sec is a time_t. --- libraries/libldap/result.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 */ -- 2.39.5