diff options
Diffstat (limited to 'mail/message-list.c')
-rw-r--r-- | mail/message-list.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/mail/message-list.c b/mail/message-list.c index 861d2d2381..35e0727864 100644 --- a/mail/message-list.c +++ b/mail/message-list.c @@ -82,6 +82,16 @@ #include <unistd.h> #endif +#ifdef G_OS_WIN32 +/* Undefine the similar macro from <pthread.h>,it doesn't check if + * localtime() returns NULL. + */ +#undef localtime_r + +/* The localtime() in Microsoft's C library is MT-safe */ +#define localtime_r(tp,tmp) (localtime(tp)?(*(tmp)=*localtime(tp),(tmp)):0) +#endif + #define d(x) #define t(x) |