summaryrefslogtreecommitdiff
path: root/openbsd-compat/bsd-statvfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'openbsd-compat/bsd-statvfs.c')
-rw-r--r--openbsd-compat/bsd-statvfs.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/openbsd-compat/bsd-statvfs.c b/openbsd-compat/bsd-statvfs.c
index 458dbe89c..e3bd87d98 100644
--- a/openbsd-compat/bsd-statvfs.c
+++ b/openbsd-compat/bsd-statvfs.c
@@ -25,6 +25,10 @@
25 25
26#include <errno.h> 26#include <errno.h>
27 27
28#ifndef MNAMELEN
29# define MNAMELEN 32
30#endif
31
28static void 32static void
29copy_statfs_to_statvfs(struct statvfs *to, struct statfs *from) 33copy_statfs_to_statvfs(struct statvfs *to, struct statfs *from)
30{ 34{
@@ -37,7 +41,11 @@ copy_statfs_to_statvfs(struct statvfs *to, struct statfs *from)
37 to->f_ffree = from->f_ffree; 41 to->f_ffree = from->f_ffree;
38 to->f_favail = from->f_ffree; /* no exact equivalent */ 42 to->f_favail = from->f_ffree; /* no exact equivalent */
39 to->f_fsid = 0; /* XXX fix me */ 43 to->f_fsid = 0; /* XXX fix me */
44#ifdef HAVE_STRUCT_STATFS_F_FLAGS
40 to->f_flag = from->f_flags; 45 to->f_flag = from->f_flags;
46#else
47 to->f_flag = 0;
48#endif
41 to->f_namemax = MNAMELEN; 49 to->f_namemax = MNAMELEN;
42} 50}
43 51