// This file is part of the Coral project.
// Please read the copyright notice in the LICENSE file.

#include "multithread.h"

namespace coral {

#ifndef HAVE_LOCALTIME_R

INIT_MUTEX(mutex_localtime_r);

struct tm* localtime_r(time_t* curtime, struct tm* user_tm) {
	LockMutex l(mutex_localtime_r);
	struct tm* a = localtime(curtime);
	*user_tm = *a;
	return user_tm;
}

#endif

}
