diff options
Diffstat (limited to 'compat/localtime_r.c')
-rw-r--r-- | compat/localtime_r.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/compat/localtime_r.c b/compat/localtime_r.c new file mode 100644 index 0000000..017c6e4 --- /dev/null +++ b/compat/localtime_r.c @@ -0,0 +1,14 @@ +#ifdef HAVE_CONFIG_H +#include <ldns/config.h> +#endif + +#ifdef HAVE_TIME_H +#include <time.h> +#endif + +struct tm *localtime_r(const time_t *timep, struct tm *result) +{ + /* no thread safety. */ + *result = *localtime(timep); + return result; +} |