Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions ext/standard/filestat.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,16 @@
# include <os2.h>
#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 <sys/statvfs.h>
#elif defined(HAVE_SYS_STATFS_H) && defined(HAVE_STATFS)
Expand Down