1 diff -u -r ../Python-3.4.1/Modules/posixmodule.c ./Modules/posixmodule.c
2 --- ../Python-3.4.1/Modules/posixmodule.c 2014-05-19 07:19:39.000000000 +0200
3 +++ ./Modules/posixmodule.c 2014-06-25 21:42:11.191524129 +0200
5 if (_Py_set_inheritable(master_fd, 0, NULL) < 0)
8 -#if !defined(__CYGWIN__) && !defined(HAVE_DEV_PTC)
9 +#if !defined(__CYGWIN__) && !defined(HAVE_DEV_PTC) && !defined(__ANDROID__)
10 ioctl(slave_fd, I_PUSH, "ptem"); /* push ptem */
11 ioctl(slave_fd, I_PUSH, "ldterm"); /* push ldterm */
13 @@ -9162,7 +9162,12 @@
14 needed definitions in sys/statvfs.h */
17 -#include <sys/statvfs.h>
19 +# include <sys/vfs.h>
20 +# define statvfs statfs
22 +# include <sys/statvfs.h>
26 _pystatvfs_fromstructstatvfs(struct statvfs st) {
27 @@ -9178,9 +9183,15 @@
28 PyStructSequence_SET_ITEM(v, 4, PyLong_FromLong((long) st.f_bavail));
29 PyStructSequence_SET_ITEM(v, 5, PyLong_FromLong((long) st.f_files));
30 PyStructSequence_SET_ITEM(v, 6, PyLong_FromLong((long) st.f_ffree));
32 + PyStructSequence_SET_ITEM(v, 7, PyLong_FromLong((long) st.f_bavail));
33 + PyStructSequence_SET_ITEM(v, 8, PyLong_FromLong((long) st.f_flags));
34 + PyStructSequence_SET_ITEM(v, 9, PyLong_FromLong((long) st.f_namelen));
36 PyStructSequence_SET_ITEM(v, 7, PyLong_FromLong((long) st.f_favail));
37 PyStructSequence_SET_ITEM(v, 8, PyLong_FromLong((long) st.f_flag));
38 PyStructSequence_SET_ITEM(v, 9, PyLong_FromLong((long) st.f_namemax));
41 PyStructSequence_SET_ITEM(v, 0, PyLong_FromLong((long) st.f_bsize));
42 PyStructSequence_SET_ITEM(v, 1, PyLong_FromLong((long) st.f_frsize));
43 @@ -9194,11 +9205,18 @@
44 PyLong_FromLongLong((PY_LONG_LONG) st.f_files));
45 PyStructSequence_SET_ITEM(v, 6,
46 PyLong_FromLongLong((PY_LONG_LONG) st.f_ffree));
48 + PyStructSequence_SET_ITEM(v, 7,
49 + PyLong_FromLongLong((PY_LONG_LONG) st.b_favail));
50 + PyStructSequence_SET_ITEM(v, 8, PyLong_FromLong((long) st.f_flags));
51 + PyStructSequence_SET_ITEM(v, 9, PyLong_FromLong((long) st.f_namelen));
53 PyStructSequence_SET_ITEM(v, 7,
54 PyLong_FromLongLong((PY_LONG_LONG) st.f_favail));
55 PyStructSequence_SET_ITEM(v, 8, PyLong_FromLong((long) st.f_flag));
56 PyStructSequence_SET_ITEM(v, 9, PyLong_FromLong((long) st.f_namemax));
59 if (PyErr_Occurred()) {
62 @@ -9221,7 +9239,11 @@
63 if (!PyArg_ParseTuple(args, "i:fstatvfs", &fd))
65 Py_BEGIN_ALLOW_THREADS
67 + res = fstatfs(fd, &st);
69 res = fstatvfs(fd, &st);
74 @@ -9232,7 +9254,13 @@
77 #if defined(HAVE_STATVFS) && defined(HAVE_SYS_STATVFS_H)
78 -#include <sys/statvfs.h>
80 +# include <sys/vfs.h>
81 +# define statvfs statfs
83 +# include <sys/statvfs.h>
87 PyDoc_STRVAR(posix_statvfs__doc__,
89 @@ -9271,7 +9299,11 @@
94 + result = fstatfs(path.fd, &st);
96 result = fstatvfs(path.fd, &st);