in openbsd-compat/bsd-statvfs.c [59:73]
int statvfs(const char *path, struct statvfs *buf)
{
# if defined(HAVE_STATFS) && defined(HAVE_STRUCT_STATFS)
struct statfs fs;
memset(&fs, 0, sizeof(fs));
if (statfs(path, &fs) == -1)
return -1;
copy_statfs_to_statvfs(buf, &fs);
return 0;
# else
errno = ENOSYS;
return -1;
# endif
}