This commit is contained in:
Krzosa Karol
2024-01-08 07:06:51 +01:00
parent fbf32c2c59
commit 2adeb7aecc
2 changed files with 3 additions and 1 deletions

View File

@@ -546,7 +546,7 @@ OS_API int64_t OS_GetFileModTime(S8_String file) {
struct stat attrib = {};
stat(file.str, &attrib);
struct timespec ts = attrib.st_mtim;
struct timespec ts = attrib.IF_LINUX_ELSE(st_mtim, st_mtimespec);
int64_t result = (((int64_t)ts.tv_sec) * 1000000ll) + ((int64_t)ts.tv_nsec) / 1000ll;
MA_ReleaseScratch(scratch);

View File

@@ -96,8 +96,10 @@
#if OS_LINUX
#define ON_LINUX(x) x
#define IF_LINUX_ELSE(x, y) x
#else
#define ON_LINUX(x)
#define IF_LINUX_ELSE(x, y) y
#endif
// #if COMPILER_CLANG