You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

34 lines
936 B

diff -u -r ../openssh-6.5p1/openbsd-compat/bsd-statvfs.c ./openbsd-compat/bsd-statvfs.c
--- ../openssh-6.5p1/openbsd-compat/bsd-statvfs.c 2014-01-17 08:10:59.000000000 +0100
+++ ./openbsd-compat/bsd-statvfs.c 2014-02-11 11:01:33.000000000 +0100
@@ -27,6 +27,12 @@
#include <errno.h>
+#ifdef __ANDROID__
+# include <sys/vfs.h>
+# define statvfs statfs
+# define fstatvfs fstatfs
+#endif
+
static void
copy_statfs_to_statvfs(struct statvfs *to, struct statfs *from)
{
@@ -37,10 +43,17 @@
to->f_bavail = from->f_bavail;
to->f_files = from->f_files;
to->f_ffree = from->f_ffree;
+#ifdef __ANDROID__
+ to->f_bavail = from->f_bavail;
+ to->f_fsid = from->f_fsid;
+ to->f_flags = from->f_flags;
+ to->f_namelen = from->f_namelen;
+#else
to->f_favail = from->f_ffree; /* no exact equivalent */
to->f_fsid = 0; /* XXX fix me */
to->f_flag = from->f_flags;
to->f_namemax = MNAMELEN;
+#endif
}
# ifndef HAVE_STATVFS