mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-04-12 15:10:31 +08:00
Fix pointer incompatibility issue on some platforms
Don't assume tv_sec is a time_t.
This commit is contained in:
parent
db564ab516
commit
a1e3b1cf3c
@ -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 */
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user