aboutsummaryrefslogtreecommitdiff
path: root/win32
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2010-04-14 06:56:24 +0200
committerNguyễn Thái Ngọc Duy <pclouds@gmail.com>2010-04-20 19:14:02 +0200
commitdf414e9d639a8c1253cfb6225609e22eed91150a (patch)
tree704fcd569be8a7e974a57aa198036b6da8e083f0 /win32
parent5963dfebf78dfb59bcb3914bd34ba78113537c4a (diff)
downloadbusybox-w32-df414e9d639a8c1253cfb6225609e22eed91150a.tar.gz
busybox-w32-df414e9d639a8c1253cfb6225609e22eed91150a.tar.bz2
busybox-w32-df414e9d639a8c1253cfb6225609e22eed91150a.zip
win32: add gmtime_r()
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Diffstat (limited to 'win32')
-rw-r--r--win32/mingw.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/win32/mingw.c b/win32/mingw.c
index 09d746f21..1a476651a 100644
--- a/win32/mingw.c
+++ b/win32/mingw.c
@@ -62,3 +62,10 @@ int pipe(int filedes[2])
62 return -1; 62 return -1;
63 return 0; 63 return 0;
64} 64}
65
66struct tm *gmtime_r(const time_t *timep, struct tm *result)
67{
68 /* gmtime() in MSVCRT.DLL is thread-safe, but not reentrant */
69 memcpy(result, gmtime(timep), sizeof(struct tm));
70 return result;
71}