xref: /freebsd/contrib/ldns/compat/asctime_r.c (revision d44c9549ef31884ac069b0306bad248a74bb2825)
1 #ifdef HAVE_CONFIG_H
2 #include <ldns/config.h>
3 #endif
4 
5 #ifdef HAVE_TIME_H
6 #include <time.h>
7 #endif
8 
asctime_r(const struct tm * tm,char * buf)9 char *asctime_r(const struct tm *tm, char *buf)
10 {
11 	/* no thread safety. */
12 	char* result = asctime(tm);
13 	if(buf && result)
14 		strcpy(buf, result);
15 	return result;
16 }
17