aboutsummaryrefslogtreecommitdiffstats
path: root/win32.c
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-06-10 05:09:33 +0200
committerJelmer Vernooij <jelmer@samba.org>2008-06-10 05:09:33 +0200
commit55eda086dc21a5ed7f4e13a3b129b817d151df86 (patch)
tree239215031cb3127610b8d31b8c10de2a47c1871f /win32.c
parent7d3ef7bbfd09ce0a8d8dbdb651fdaa862f75af21 (diff)
Provide thread-unsafe replacement for gmtime_r on Windows.
Diffstat (limited to 'win32.c')
-rw-r--r--win32.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/win32.c b/win32.c
index 7808ac2e..fc73b611 100644
--- a/win32.c
+++ b/win32.c
@@ -317,3 +317,16 @@ void log_message(int level, char *message, ...)
}
void log_link(int level, int output) { /* FIXME */ }
+
+struct tm *
+gmtime_r (const time_t *timer, struct tm *result)
+{
+ struct tm *local_result;
+ local_result = gmtime (timer);
+
+ if (local_result == NULL || result == NULL)
+ return NULL;
+
+ memcpy (result, local_result, sizeof (result));
+ return result;
+}