So perhaps we want to also check for that? Here was what my PR would have been if I pushed.
#ifdef _WIN32
#define stat64 _stat64
#define PRFILESYSTEM_PATH "ls"
+#elif defined(__APPLE__) && defined(__arm64__)
+// __DARWIN_ONLY_64_BIT_INO_T is set on ARM-based Macs (which then sets __DARWIN_64_BIT_INO_T).
+// This sets the following in Apple SDK's stat.h: struct stat __DARWIN_STRUCT_STAT64;
+// So use stat over stat64 for ARM-based Macs
+#define stat64 stat
+#define PRFILESYSTEM_PATH "s"
#else
#define PRFILESYSTEM_PATH "s"
#endif
Can either use above or add a check for __arm64__ in your existing PR (fine with either) 👍
Ha ran into this on my end too (glad I checked the PRs before pushing mine).
I found that this is intrinsic to ARM-based Macs only: https://github.com/apple/darwin-xnu/blob/xnu-7195.121.3/bsd/sys/cdefs.h#L613
So perhaps we want to also check for that? Here was what my PR would have been if I pushed.
Can either use above or add a check for
__arm64__
in your existing PR (fine with either) 👍