Skip to content
Snippets Groups Projects
Commit a1e3b1cf authored by Kurt Zeilenga's avatar Kurt Zeilenga Committed by Kurt Zeilenga
Browse files

Fix pointer incompatibility issue on some platforms

Don't assume tv_sec is a time_t.
parent db564ab5
No related branches found
No related tags found
No related merge requests found
......@@ -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 */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment