libcheck: port to latest check git
[platform/upstream/gstreamer.git] / libs / gst / check / libcheck / libcompat / localtime_r.c
1 #include "libcompat.h"
2
3 #if !defined(localtime_r)
4
5 struct tm *
6 localtime_r (const time_t * clock, struct tm *result)
7 {
8   struct tm *now = localtime (clock);
9
10   if (now == NULL) {
11     return NULL;
12   } else {
13     *result = *now;
14   }
15
16   return result;
17 }
18
19 #endif /* !defined(localtime_r) */