summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorGregory P. Smith <greg@krypto.org>2014-04-14 20:31:21 (GMT)
committerGregory P. Smith <greg@krypto.org>2014-04-14 20:31:21 (GMT)
commitefeb9da4ae97861101a7582f8eafdaf836e82cd7 (patch)
tree7f3a7d840e7afaa6402c6ec3752ea42ed4f3704b /Modules
parent01bafdcccc4ab653f70379a58a3183fac36e7132 (diff)
downloadcpython-efeb9da4ae97861101a7582f8eafdaf836e82cd7.zip
cpython-efeb9da4ae97861101a7582f8eafdaf836e82cd7.tar.gz
cpython-efeb9da4ae97861101a7582f8eafdaf836e82cd7.tar.bz2
Add conditional code for android's lack of definition of SYS_getdent64.
Fixes issue20307. No Misc/NEWS entry because frankly this is an esoteric platform for anyone to be figuring out how to cross compile CPython for.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/_posixsubprocess.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/Modules/_posixsubprocess.c b/Modules/_posixsubprocess.c
index a2d7022..648a569 100644
--- a/Modules/_posixsubprocess.c
+++ b/Modules/_posixsubprocess.c
@@ -18,6 +18,12 @@
#include <dirent.h>
#endif
+#if defined(__ANDROID__) && !defined(SYS_getdents64)
+/* Android doesn't expose syscalls, add the definition manually. */
+# include <sys/linux-syscalls.h>
+# define SYS_getdents64 __NR_getdents64
+#endif
+
#if defined(sun)
/* readdir64 is used to work around Solaris 9 bug 6395699. */
# define readdir readdir64