summaryrefslogtreecommitdiff
path: root/block
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@us.ibm.com>2013-01-11 08:43:18 -0600
committerAnthony Liguori <aliguori@us.ibm.com>2013-01-11 08:43:18 -0600
commitfedf2de31023b4ee71a4e578db013976243a8143 (patch)
tree045c7ea2a636428ee70545ef3f76a804989be050 /block
parente2848a78b0a6715f94623bdf43ef74d3d08cfe4d (diff)
parentc02e1eac887b1b0aee7361b1fcf889e7d47fed9d (diff)
Merge remote-tracking branch 'stefanha/trivial-patches' into staging
* stefanha/trivial-patches: hw/pc.c: Fix converting of ioport_register* to MemoryRegion Replace remaining gmtime, localtime by gmtime_r, localtime_r savevm: Remove MinGW specific code which is no longer needed qga/channel-posix.c: Explicitly include string.h configure: Fix comment (copy+paste bug) readline: avoid memcpy() of overlapping regions Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'block')
-rw-r--r--block/vvfat.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/block/vvfat.c b/block/vvfat.c
index 83706ce556..06e6654824 100644
--- a/block/vvfat.c
+++ b/block/vvfat.c
@@ -529,13 +529,9 @@ static inline uint8_t fat_chksum(const direntry_t* entry)
/* if return_time==0, this returns the fat_date, else the fat_time */
static uint16_t fat_datetime(time_t time,int return_time) {
struct tm* t;
-#ifdef _WIN32
- t=localtime(&time); /* this is not thread safe */
-#else
struct tm t1;
t = &t1;
localtime_r(&time,t);
-#endif
if(return_time)
return cpu_to_le16((t->tm_sec/2)|(t->tm_min<<5)|(t->tm_hour<<11));
return cpu_to_le16((t->tm_mday)|((t->tm_mon+1)<<5)|((t->tm_year-80)<<9));