From fef0cdfd0c3ed09f8601cfb7e18a64c7bdaba317 Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Thu, 11 Jan 2024 18:53:14 +0100 Subject: Apple just doesn’t have .st_mtim, fml MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cbs.h | 9 +++++++-- 1 file 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 #include @@ -884,4 +885,8 @@ tpwait(tpool_t *tp) # pragma GCC diagnostic pop #endif +#ifdef __APPLE__ +# undef st_mtim +#endif + #endif /* !C_BUILD_SYSTEM_H */ -- cgit v1.2.3