mirror of
https://github.com/aseprite/aseprite.git
synced 2024-09-15 15:14:16 +00:00
Fix compilation problems with time structures on Linux
This commit is contained in:
parent
f0ab007144
commit
e822ddba4c
@ -10,6 +10,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <stdexcept>
|
||||
#include <vector>
|
||||
#include <ctime>
|
||||
|
||||
#if __APPLE__
|
||||
#include <mach-o/dyld.h>
|
||||
@ -90,7 +91,7 @@ Time get_modification_time(const std::string& path)
|
||||
if (result != 0)
|
||||
return Time();
|
||||
|
||||
struct tm* t = localtime(&sts.st_mtime);
|
||||
std::tm* t = std::localtime(&sts.st_mtime);
|
||||
return Time(
|
||||
t->tm_year+1900, t->tm_mon+1, t->tm_mday,
|
||||
t->tm_hour, t->tm_min, t->tm_sec);
|
||||
|
@ -29,7 +29,7 @@ Time current_time()
|
||||
#else
|
||||
|
||||
std::time_t now = std::time(nullptr);
|
||||
struct tm* t = std::time(nullptr);
|
||||
std::tm* t = std::localtime(&now);
|
||||
return Time(
|
||||
t->tm_year+1900, t->tm_mon+1, t->tm_mday,
|
||||
t->tm_hour, t->tm_min, t->tm_sec);
|
||||
|
Loading…
Reference in New Issue
Block a user