]> granicus.if.org Git - python/commitdiff
Add conditional code for android's lack of definition of SYS_getdent64.
authorGregory P. Smith <greg@krypto.org>
Mon, 14 Apr 2014 20:31:21 +0000 (13:31 -0700)
committerGregory P. Smith <greg@krypto.org>
Mon, 14 Apr 2014 20:31:21 +0000 (13:31 -0700)
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

index a2d7022992606e094f5d6d299d66546d704985aa..648a569ca7ffe3ba83c8d244206f0ca9e65f1d09 100644 (file)
 #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