diff options
author | Darren Tucker <dtucker@dtucker.net> | 2018-02-25 11:22:57 +1100 |
---|---|---|
committer | Darren Tucker <dtucker@dtucker.net> | 2018-02-26 00:09:04 +1100 |
commit | 11057564eb6ab8fd987de50c3d7f394c6f6632b7 (patch) | |
tree | 0702d5182bb32de607b84110e36e3a2f167b13a7 /openbsd-compat/bsd-statvfs.c | |
parent | e9dede06e5bc582a4aeb5b1cd5a7a640d7de3609 (diff) |
bsd-statvfs: include sys/vfs.h, check for f_flags.
Diffstat (limited to 'openbsd-compat/bsd-statvfs.c')
-rw-r--r-- | openbsd-compat/bsd-statvfs.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/openbsd-compat/bsd-statvfs.c b/openbsd-compat/bsd-statvfs.c index 458dbe89..e3bd87d9 100644 --- a/openbsd-compat/bsd-statvfs.c +++ b/openbsd-compat/bsd-statvfs.c @@ -25,6 +25,10 @@ #include <errno.h> +#ifndef MNAMELEN +# define MNAMELEN 32 +#endif + static void copy_statfs_to_statvfs(struct statvfs *to, struct statfs *from) { @@ -37,7 +41,11 @@ copy_statfs_to_statvfs(struct statvfs *to, struct statfs *from) to->f_ffree = from->f_ffree; to->f_favail = from->f_ffree; /* no exact equivalent */ to->f_fsid = 0; /* XXX fix me */ +#ifdef HAVE_STRUCT_STATFS_F_FLAGS to->f_flag = from->f_flags; +#else + to->f_flag = 0; +#endif to->f_namemax = MNAMELEN; } |