summaryrefslogtreecommitdiff
path: root/src/helpers.cpp
diff options
context:
space:
mode:
authorAndrzej Rybczak <electricityispower@gmail.com>2010-05-14 18:05:14 +0200
committerAndrzej Rybczak <electricityispower@gmail.com>2010-05-14 18:05:14 +0200
commit9adb76203601220e418790bff84041ad08c7c174 (patch)
treee7a9831f21891e5e3b012f168fe5b16f4ac17a28 /src/helpers.cpp
parent6eae6cd0f6a34f7b850f0ee0e19776c7c5d6882a (diff)
fix compilation with mingw32
Diffstat (limited to 'src/helpers.cpp')
-rw-r--r--src/helpers.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/helpers.cpp b/src/helpers.cpp
index 28534007..356ad5f7 100644
--- a/src/helpers.cpp
+++ b/src/helpers.cpp
@@ -268,8 +268,12 @@ bool CaseInsensitiveSorting::operator()(const MPD::Item &a, const MPD::Item &b)
std::string Timestamp(time_t t)
{
char result[32];
+# ifdef WIN32
+ result[strftime(result, 31, "%x %X", localtime(&t))] = 0;
+# else
tm info;
result[strftime(result, 31, "%x %X", localtime_r(&t, &info))] = 0;
+# endif // WIN32
return result;
}