From efeb9da4ae97861101a7582f8eafdaf836e82cd7 Mon Sep 17 00:00:00 2001 From: "Gregory P. Smith" Date: Mon, 14 Apr 2014 13:31:21 -0700 Subject: [PATCH] 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. --- Modules/_posixsubprocess.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Modules/_posixsubprocess.c b/Modules/_posixsubprocess.c index a2d70229926..648a569ca7f 100644 --- a/Modules/_posixsubprocess.c +++ b/Modules/_posixsubprocess.c @@ -18,6 +18,12 @@ #include #endif +#if defined(__ANDROID__) && !defined(SYS_getdents64) +/* Android doesn't expose syscalls, add the definition manually. */ +# include +# define SYS_getdents64 __NR_getdents64 +#endif + #if defined(sun) /* readdir64 is used to work around Solaris 9 bug 6395699. */ # define readdir readdir64