mirror of
https://github.com/libretro/ppsspp.git
synced 2025-01-26 11:16:13 +00:00
Add localtime_r function which is not existing in Windows
This commit is contained in:
parent
825e058c94
commit
6eef9a1d1e
@ -70,6 +70,16 @@ static inline int readdir_r(DIR *dirp, struct dirent *entry, struct dirent **res
|
||||
}
|
||||
#endif
|
||||
|
||||
// No thread safe
|
||||
#ifdef _WIN32
|
||||
inline struct tm* localtime_r (const time_t *clock, struct tm *result) {
|
||||
if (!clock || !result) return NULL;
|
||||
memcpy(result,localtime(clock),sizeof(*result));
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
// This namespace has various generic functions related to files and paths.
|
||||
// The code still needs a ton of cleanup.
|
||||
// REMEMBER: strdup considered harmful!
|
||||
|
Loading…
x
Reference in New Issue
Block a user