Initial push
[termux-packages] / packages / openssh / no_statvfs.patch
1 diff -u -r ../openssh-6.5p1/openbsd-compat/bsd-statvfs.c ./openbsd-compat/bsd-statvfs.c
2 --- ../openssh-6.5p1/openbsd-compat/bsd-statvfs.c 2014-01-17 08:10:59.000000000 +0100
3 +++ ./openbsd-compat/bsd-statvfs.c 2014-02-11 11:01:33.000000000 +0100
4 @@ -27,6 +27,12 @@
5
6 #include <errno.h>
7
8 +#ifdef __ANDROID__
9 +# include <sys/vfs.h>
10 +# define statvfs statfs
11 +# define fstatvfs fstatfs
12 +#endif
13 +
14 static void
15 copy_statfs_to_statvfs(struct statvfs *to, struct statfs *from)
16 {
17 @@ -37,10 +43,17 @@
18 to->f_bavail = from->f_bavail;
19 to->f_files = from->f_files;
20 to->f_ffree = from->f_ffree;
21 +#ifdef __ANDROID__
22 + to->f_bavail = from->f_bavail;
23 + to->f_fsid = from->f_fsid;
24 + to->f_flags = from->f_flags;
25 + to->f_namelen = from->f_namelen;
26 +#else
27 to->f_favail = from->f_ffree; /* no exact equivalent */
28 to->f_fsid = 0; /* XXX fix me */
29 to->f_flag = from->f_flags;
30 to->f_namemax = MNAMELEN;
31 +#endif
32 }
33
34 # ifndef HAVE_STATVFS