Revision d3e8f957

b/oslib-win32.c
74 74
    VirtualFree(ptr, 0, MEM_RELEASE);
75 75
}
76 76

  
77
/* FIXME: add proper locking */
78
struct tm *gmtime_r(const time_t *timep, struct tm *result)
79
{
80
    struct tm *p = gmtime(timep);
81
    memset(result, 0, sizeof(*result));
82
    if (p) {
83
        *result = *p;
84
        p = result;
85
    }
86
    return p;
87
}
88

  
89
/* FIXME: add proper locking */
90
struct tm *localtime_r(const time_t *timep, struct tm *result)
91
{
92
    struct tm *p = localtime(timep);
93
    memset(result, 0, sizeof(*result));
94
    if (p) {
95
        *result = *p;
96
        p = result;
97
    }
98
    return p;
99
}
100

  
77 101
void socket_set_block(int fd)
78 102
{
79 103
    unsigned long opt = 0;
b/qemu-os-win32.h
68 68
/* Declaration of ffs() is missing in MinGW's strings.h. */
69 69
int ffs(int i);
70 70

  
71
/* Missing POSIX functions. Don't use MinGW-w64 macros. */
72
#undef gmtime_r
73
struct tm *gmtime_r(const time_t *timep, struct tm *result);
74
#undef localtime_r
75
struct tm *localtime_r(const time_t *timep, struct tm *result);
76

  
71 77
static inline void os_setup_signal_handling(void) {}
72 78
static inline void os_daemonize(void) {}
73 79
static inline void os_setup_post(void) {}

Also available in: Unified diff