in openbsd-compat/bsd-statvfs.c [77:91]
int fstatvfs(int fd, struct statvfs *buf)
{
# if defined(HAVE_FSTATFS) && defined(HAVE_STRUCT_STATFS)
struct statfs fs;
memset(&fs, 0, sizeof(fs));
if (fstatfs(fd, &fs) == -1)
return -1;
copy_statfs_to_statvfs(buf, &fs);
return 0;
# else
errno = ENOSYS;
return -1;
# endif
}