From 9c8d536b467d4b60cce85d664cf30d0280b27c18 Mon Sep 17 00:00:00 2001 From: Rom Walton Date: Thu, 2 Dec 2010 20:48:32 +0000 Subject: [PATCH] Quick Updates svn path=/branches/boinc_core_release_6_12/; revision=22814 --- api/boinc_api.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/api/boinc_api.cpp b/api/boinc_api.cpp index 63f14e9d94..9f875154e2 100644 --- a/api/boinc_api.cpp +++ b/api/boinc_api.cpp @@ -203,7 +203,11 @@ char* boinc_msg_prefix(char* sbuf, int len) { strcpy(sbuf, "time() failed"); return sbuf; } +#ifdef _WIN32 + if (localtime_s(&tm, &x) == EINVAL) { +#else if (localtime_r(&x, &tm) == NULL) { +#endif strcpy(sbuf, "localtime() failed"); return sbuf; }