xref: /freebsd/contrib/ldns/compat/localtime_r.c (revision cfe30d02adda7c3b5c76156ac52d50d8cab325d9)
1*7b5038d7SDag-Erling Smørgrav #ifdef HAVE_CONFIG_H
2*7b5038d7SDag-Erling Smørgrav #include <ldns/config.h>
3*7b5038d7SDag-Erling Smørgrav #endif
4*7b5038d7SDag-Erling Smørgrav 
5*7b5038d7SDag-Erling Smørgrav #ifdef HAVE_TIME_H
6*7b5038d7SDag-Erling Smørgrav #include <time.h>
7*7b5038d7SDag-Erling Smørgrav #endif
8*7b5038d7SDag-Erling Smørgrav 
localtime_r(const time_t * timep,struct tm * result)9*7b5038d7SDag-Erling Smørgrav struct tm *localtime_r(const time_t *timep, struct tm *result)
10*7b5038d7SDag-Erling Smørgrav {
11*7b5038d7SDag-Erling Smørgrav 	/* no thread safety. */
12*7b5038d7SDag-Erling Smørgrav 	*result = *localtime(timep);
13*7b5038d7SDag-Erling Smørgrav 	return result;
14*7b5038d7SDag-Erling Smørgrav }
15