summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGregory P. Smith <greg@krypto.org>2014-04-14 20:31:55 (GMT)
committerGregory P. Smith <greg@krypto.org>2014-04-14 20:31:55 (GMT)
commitb396a2ab49153999400eee998bf1c9564d5c3021 (patch)
tree5ad09ac757e9254442df451cc69efbfe115ef71a
parentfba913f77aa53dff416753c987bf590762c98406 (diff)
parentefeb9da4ae97861101a7582f8eafdaf836e82cd7 (diff)
downloadcpython-b396a2ab49153999400eee998bf1c9564d5c3021.zip
cpython-b396a2ab49153999400eee998bf1c9564d5c3021.tar.gz
cpython-b396a2ab49153999400eee998bf1c9564d5c3021.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.
-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