projects
/
mono.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[w32file] Move MonoIO.Find{First,Next,Close} to managed
[mono.git]
/
support
/
sys-statvfs.c
diff --git
a/support/sys-statvfs.c
b/support/sys-statvfs.c
index 60fecdd92c5a11832f12ae1ac9010aebf6831068..e03152a773d95d4f12fe1fc7ad78b240b1cb8f60 100644
(file)
--- a/
support/sys-statvfs.c
+++ b/
support/sys-statvfs.c
@@
-14,12
+14,20
@@
#include "mph.h"
#include "map.h"
#include "mph.h"
#include "map.h"
+#ifdef HAVE_PATHCONF_H
+#include <pathconf.h>
+#endif
+
#ifdef HAVE_SYS_STATVFS_H
#include <sys/statvfs.h>
#ifdef HAVE_SYS_STATVFS_H
#include <sys/statvfs.h>
+#elif defined (HAVE_STATFS) || defined (HAVE_FSTATFS)
+#include <sys/vfs.h>
#endif /* def HAVE_SYS_STATVFS_H */
#ifdef HAVE_GETFSSTAT
#endif /* def HAVE_SYS_STATVFS_H */
#ifdef HAVE_GETFSSTAT
+#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#include <sys/param.h>
+#endif
#include <sys/ucred.h>
#include <sys/mount.h>
#include <unistd.h> /* for pathconf */
#include <sys/ucred.h>
#include <sys/mount.h>
#include <unistd.h> /* for pathconf */
@@
-142,8
+150,10
@@
Mono_Posix_ToStatvfs (void *_from, struct Mono_Posix_Statvfs *to)
// so this shouldn't lose anything.
memcpy (&to->f_fsid, &from->f_fsid, sizeof(to->f_fsid));
// so this shouldn't lose anything.
memcpy (&to->f_fsid, &from->f_fsid, sizeof(to->f_fsid));
+#if HAVE_STRUCT_STATFS_F_FLAGS
if (Mono_Posix_ToMountFlags (from->f_flags, &to->f_flag) != 0)
return -1;
if (Mono_Posix_ToMountFlags (from->f_flags, &to->f_flag) != 0)
return -1;
+#endif /* def HAVE_STRUCT_STATFS_F_FLAGS */
return 0;
}
return 0;
}
@@
-165,9
+175,11
@@
Mono_Posix_FromStatvfs (struct Mono_Posix_Statvfs *from, void *_to)
// so this shouldn't lose anything.
memcpy (&to->f_fsid, &from->f_fsid, sizeof(to->f_fsid));
// so this shouldn't lose anything.
memcpy (&to->f_fsid, &from->f_fsid, sizeof(to->f_fsid));
+#if HAVE_STRUCT_STATFS_F_FLAGS
if (Mono_Posix_FromMountFlags (from->f_flag, &flag) != 0)
return -1;
to->f_flags = flag;
if (Mono_Posix_FromMountFlags (from->f_flag, &flag) != 0)
return -1;
to->f_flags = flag;
+#endif /* def HAVE_STRUCT_STATFS_F_FLAGS */
return 0;
}
return 0;
}