mirror of
https://github.com/ioacademy-jikim/debugging
synced 2025-06-23 07:46:22 +00:00
22 lines
313 B
C
22 lines
313 B
C
#include "libcompat.h"
|
|
|
|
#if !defined(localtime_r)
|
|
|
|
struct tm *localtime_r(const time_t * clock, struct tm *result)
|
|
{
|
|
struct tm *now = localtime(clock);
|
|
|
|
if(now == NULL)
|
|
{
|
|
return NULL;
|
|
}
|
|
else
|
|
{
|
|
*result = *now;
|
|
}
|
|
|
|
return result;
|
|
}
|
|
|
|
#endif /* !defined(localtime_r) */
|