aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cbs.h4
-rw-r--r--grab.c4
-rw-r--r--make.c4
3 files changed, 11 insertions, 1 deletions
diff --git a/cbs.h b/cbs.h
index 789f532..6408519 100644
--- a/cbs.h
+++ b/cbs.h
@@ -50,6 +50,10 @@
# error "Non-POSIX platform detected"
#endif
+#ifdef __APPLE__
+# define st_mtim st_mtimespec
+#endif
+
#include <sys/stat.h>
#include <sys/wait.h>
diff --git a/grab.c b/grab.c
index 7f0e9f4..4b80aba 100644
--- a/grab.c
+++ b/grab.c
@@ -5,7 +5,9 @@
#include <limits.h>
#include <locale.h>
#include <regex.h>
-#include <stdbool.h>
+#if !GRAB_IS_C23
+# include <stdbool.h>
+#endif
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
diff --git a/make.c b/make.c
index dfbe7bd..9b38a62 100644
--- a/make.c
+++ b/make.c
@@ -1,3 +1,4 @@
+#define _POSIX_C_SOURCE 200809L
#include <errno.h>
#include <limits.h>
#include <stdbool.h>
@@ -75,6 +76,9 @@ main(int argc, char **argv)
} else {
if (foutdated("grab", "grab.c", "da.h")) {
cmdadd(&c, CC, WFLAGS);
+#ifdef CBS_IS_C23
+ cmdadd(&c, "-DGRAB_IS_C23=1");
+#endif
if (debug)
cmdadd(&c, DFLAGS);
else