aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cbs.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/cbs.h b/cbs.h
index f319ea6..0cffcaf 100644
--- a/cbs.h
+++ b/cbs.h
@@ -55,8 +55,9 @@
# error "Non-POSIX platform detected"
#endif
-/* Required for st_mtim */
-#define _POSIX_C_SOURCE 200809L
+#ifdef __APPLE__
+# define st_mtim st_mtimespec
+#endif
#include <sys/stat.h>
#include <sys/wait.h>
@@ -884,4 +885,8 @@ tpwait(tpool_t *tp)
# pragma GCC diagnostic pop
#endif
+#ifdef __APPLE__
+# undef st_mtim
+#endif
+
#endif /* !C_BUILD_SYSTEM_H */