mirror of
https://github.com/transmission/transmission.git
synced 2025-12-24 20:35:36 +00:00
mingw portability fixes
This commit is contained in:
@@ -94,7 +94,12 @@ tr_getLogTimeStr( char * buf, int buflen )
|
||||
now = time( NULL );
|
||||
gettimeofday( &tv, NULL );
|
||||
|
||||
#ifdef WIN32
|
||||
now_tm = *localtime( &now );
|
||||
#else
|
||||
localtime_r( &now, &now_tm );
|
||||
#endif
|
||||
|
||||
strftime( tmp, sizeof(tmp), "%H:%M:%S", &now_tm );
|
||||
milliseconds = (int)(tv.tv_usec / 1000);
|
||||
snprintf( buf, buflen, "%s.%03d", tmp, milliseconds );
|
||||
|
||||
Reference in New Issue
Block a user