[Python-checkins] cpython (merge 3.4 -> default): Add conditional code for android's lack of definition of SYS_getdent64.

gregory.p.smith python-checkins at python.org
Mon Apr 14 22:32:47 CEST 2014


http://hg.python.org/cpython/rev/9f89958ded0a
changeset:   90288:9f89958ded0a
parent:      90284:4681e871c36c
parent:      90287:211eeb97b352
user:        Gregory P. Smith <greg at krypto.org>
date:        Mon Apr 14 13:31:55 2014 -0700
summary:
  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.

files:
  Modules/_posixsubprocess.c |  6 ++++++
  1 files changed, 6 insertions(+), 0 deletions(-)


diff --git a/Modules/_posixsubprocess.c b/Modules/_posixsubprocess.c
--- 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

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list