summaryrefslogtreecommitdiff
path: root/usr.sbin/unbound/ldns/compat/gmtime_r.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/unbound/ldns/compat/gmtime_r.c')
-rw-r--r--usr.sbin/unbound/ldns/compat/gmtime_r.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/usr.sbin/unbound/ldns/compat/gmtime_r.c b/usr.sbin/unbound/ldns/compat/gmtime_r.c
new file mode 100644
index 00000000000..7062e7dee30
--- /dev/null
+++ b/usr.sbin/unbound/ldns/compat/gmtime_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 *gmtime_r(const time_t *timep, struct tm *result)
+{
+ /* no thread safety. */
+ *result = *gmtime(timep);
+ return result;
+}