diff --git a/ext/standard/filestat.c b/ext/standard/filestat.c index 0d79bba461bea..e537f35829106 100644 --- a/ext/standard/filestat.c +++ b/ext/standard/filestat.c @@ -42,6 +42,16 @@ # include #endif +#if defined(__APPLE__) + /* + Apple statvfs has an interger overflow in libc copying to statvfs. + cvt_statfs_to_statvfs(struct statfs *from, struct statvfs *to) { + to->f_blocks = (fsblkcnt_t)from->f_blocks; + */ +# undef HAVE_SYS_STATVFS_H +# undef HAVE_STATVFS +#endif + #if defined(HAVE_SYS_STATVFS_H) && defined(HAVE_STATVFS) # include #elif defined(HAVE_SYS_STATFS_H) && defined(HAVE_STATFS)