Basic work toward compiling on Darwin

This commit is contained in:
Jordan Bancino 2024-09-21 15:47:01 -04:00
parent af4a142261
commit f7c51ee019
3 changed files with 76 additions and 1 deletions

View file

@ -24,6 +24,7 @@
#include <Util.h>
#include <Memory.h>
#include <Platform.h>
#include <stdio.h>
#include <stdlib.h>
@ -89,6 +90,10 @@ UtilTsMillis(void)
return ts;
}
#ifdef PLATFORM_DARWIN
#define st_mtim st_mtimespec
#endif
uint64_t
UtilLastModified(char *path)
{
@ -105,6 +110,10 @@ UtilLastModified(char *path)
return ts;
}
#ifdef PLATFORM_DARWIN
#undef st_mtim
#endif
int
UtilMkdir(const char *dir, const mode_t mode)
{