mirror of
https://github.com/openmoh/openmohaa.git
synced 2025-04-28 21:57:57 +03:00
Fixed parameter order in localtime_r
and gmtime_r
for FreeBSD, OpenBSD, and NetBSD
This commit is contained in:
parent
59fdcf0ae9
commit
c69ea0e4d8
1 changed files with 5 additions and 2 deletions
|
@ -307,9 +307,12 @@ void QDECL Com_Printf( const char *fmt, ... ) {
|
|||
#ifdef WIN32
|
||||
localtime_s(&tms_local, &t);
|
||||
gmtime_s(&tms_gm, &t);
|
||||
#elif defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__)
|
||||
localtime_r(&t, &tms_local);
|
||||
gmtime_r(&t, &tms_gm);
|
||||
#else
|
||||
localtime_r(&tms_local, &t);
|
||||
gmtime_r(&tms_gm, &t);
|
||||
localtime_r(&tms_local, &t);
|
||||
gmtime_r(&tms_gm, &t);
|
||||
#endif
|
||||
t_gmt = mktime(&tms_gm);
|
||||
tz = difftime(t, t_gmt) / 60.0 / 60.0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue