diff options
Diffstat (limited to 'oslib-win32.c')
-rw-r--r-- | oslib-win32.c | 30 |
1 files changed, 27 insertions, 3 deletions
diff --git a/oslib-win32.c b/oslib-win32.c index ffbc6d0c9f..e7e283e875 100644 --- a/oslib-win32.c +++ b/oslib-win32.c @@ -27,10 +27,10 @@ */ #include <windows.h> #include "config-host.h" -#include "sysemu.h" -#include "main-loop.h" +#include "sysemu/sysemu.h" +#include "qemu/main-loop.h" #include "trace.h" -#include "qemu_socket.h" +#include "qemu/sockets.h" void *qemu_oom_check(void *ptr) { @@ -74,6 +74,30 @@ void qemu_vfree(void *ptr) VirtualFree(ptr, 0, MEM_RELEASE); } +/* FIXME: add proper locking */ +struct tm *gmtime_r(const time_t *timep, struct tm *result) +{ + struct tm *p = gmtime(timep); + memset(result, 0, sizeof(*result)); + if (p) { + *result = *p; + p = result; + } + return p; +} + +/* FIXME: add proper locking */ +struct tm *localtime_r(const time_t *timep, struct tm *result) +{ + struct tm *p = localtime(timep); + memset(result, 0, sizeof(*result)); + if (p) { + *result = *p; + p = result; + } + return p; +} + void socket_set_block(int fd) { unsigned long opt = 0; |