Hopefully they'll fix this properly at some point, but until then... --- lib/portability.h | 11 +++++++++++ 1 file changed, 11 insertions(+)
diff --git a/lib/portability.h b/lib/portability.h index 21d0b8a1..ad7965ec 100644 --- a/lib/portability.h +++ b/lib/portability.h @@ -7,6 +7,17 @@ // For musl #define _ALL_SOURCE +#ifdef __APPLE__ +// macOS 10.13 doesn't have the POSIX 2008 direct access to timespec in +// struct stat, but we can ask it to give us something equivalent... +// (This must come before any #include!) +#define _DARWIN_C_SOURCE +// ...and then use macros to paper over the difference. +#define st_atim st_atimespec +#define st_ctim st_ctimespec +#define st_mtim st_mtimespec +#endif + // Test for gcc (using compiler builtin #define) #ifdef __GNUC__ -- 2.19.0.605.g01d371f741-goog
0001-macOS-fix-code-using-POSIX-2008-st_-acm-tim-fields.patch
Description: Binary data
_______________________________________________ Toybox mailing list [email protected] http://lists.landley.net/listinfo.cgi/toybox-landley.net
