fs: use statvfs in uv__fs_statfs() for Haiku

PR-URL: https://github.com/libuv/libuv/pull/2477
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <s@saghul.net>
This commit is contained in:
Calvin Hill 2019-09-16 06:04:33 +01:00 committed by Saúl Ibarra Corretgé
parent 123e3bd7a7
commit 501b5cc53e

View File

@ -78,7 +78,7 @@
defined(__NetBSD__)
# include <sys/param.h>
# include <sys/mount.h>
#elif defined(__sun) || defined(__MVS__) || defined(__NetBSD__)
#elif defined(__sun) || defined(__MVS__) || defined(__NetBSD__) || defined(__HAIKU__)
# include <sys/statvfs.h>
#else
# include <sys/statfs.h>
@ -532,7 +532,7 @@ static int uv__fs_closedir(uv_fs_t* req) {
static int uv__fs_statfs(uv_fs_t* req) {
uv_statfs_t* stat_fs;
#if defined(__sun) || defined(__MVS__) || defined(__NetBSD__)
#if defined(__sun) || defined(__MVS__) || defined(__NetBSD__) || defined(__HAIKU__)
struct statvfs buf;
if (0 != statvfs(req->path, &buf))
@ -549,7 +549,7 @@ static int uv__fs_statfs(uv_fs_t* req) {
return -1;
}
#if defined(__sun) || defined(__MVS__) || defined(__OpenBSD__) || defined(__NetBSD__)
#if defined(__sun) || defined(__MVS__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__HAIKU__)
stat_fs->f_type = 0; /* f_type is not supported. */
#else
stat_fs->f_type = buf.f_type;