summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Jamroot.jam2
-rw-r--r--libtmdb/conversions.cpp12
2 files changed, 7 insertions, 7 deletions
diff --git a/Jamroot.jam b/Jamroot.jam
index e02a59a..396dfd0 100644
--- a/Jamroot.jam
+++ b/Jamroot.jam
@@ -11,4 +11,4 @@ project
;
-alias all : project2 netfs ytfs ;
+alias all : project2 netfs libjsonpp p2pvr libtmdb slicer ;
diff --git a/libtmdb/conversions.cpp b/libtmdb/conversions.cpp
index 488419f..6df323d 100644
--- a/libtmdb/conversions.cpp
+++ b/libtmdb/conversions.cpp
@@ -8,13 +8,13 @@ namespace Slicer {
std::string
dateToString(const ::TMDb::Date & in)
{
- char buf[BUFSIZ];
- struct tm tm({ 0, 0, 0, in.Day, in.Month, in.Year, 0, 0, 0
-#ifdef _BSD_SOURCE
- , 0, 0
-#endif
- });
+ struct tm tm;
+ memset(&tm, 0, sizeof(struct tm));
+ tm.tm_mday = in.Day;
+ tm.tm_mon = in.Month;
+ tm.tm_year = in.Year;
mktime(&tm);
+ char buf[BUFSIZ];
auto len = strftime(buf, BUFSIZ, "%Y-%m-%d", &tm);
return std::string(buf, len);
}