summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgrunfink <grunfink@noreply.codeberg.org>2024-03-06 20:42:31 +0000
committergrunfink <grunfink@noreply.codeberg.org>2024-03-06 20:42:31 +0000
commitf28e52032215722dc6e0e3fe0543b9699d5a87bf (patch)
tree61043eeae655476b2a337e94629ad504eabb6e25
parentc28ab1e72bf53034e8cf72aef4415dea6c722d3a (diff)
parente608f3aff1bc8bfa8fac0a857714451b55c4e60a (diff)
Merge pull request 'Add defines for time to enable macos builds.' (#148) from andypiper/snac2:macos-build-fix into master
Reviewed-on: https://codeberg.org/grunfink/snac2/pulls/148
-rw-r--r--data.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/data.c b/data.c
index d006200..4d9824a 100644
--- a/data.c
+++ b/data.c
@@ -102,6 +102,13 @@ int srv_open(char *basedir, int auto_upgrade)
xs *tmpdir = xs_fmt("%s/tmp", srv_basedir);
mkdirx(tmpdir);
+#ifdef __APPLE__
+/* Apple uses st_atimespec instead of st_atim etc */
+#define st_atim st_atimespec
+#define st_ctim st_ctimespec
+#define st_mtim st_mtimespec
+#endif
+
#ifdef __OpenBSD__
char *v = xs_dict_get(srv_config, "disable_openbsd_security");