Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit efeb9da

Browse files
committed
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.
1 parent 01bafdc commit efeb9da

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

Modules/_posixsubprocess.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,12 @@
1818
#include <dirent.h>
1919
#endif
2020

21+
#if defined(__ANDROID__) && !defined(SYS_getdents64)
22+
/* Android doesn't expose syscalls, add the definition manually. */
23+
# include <sys/linux-syscalls.h>
24+
# define SYS_getdents64 __NR_getdents64
25+
#endif
26+
2127
#if defined(sun)
2228
/* readdir64 is used to work around Solaris 9 bug 6395699. */
2329
# define readdir readdir64

0 commit comments

Comments
 (0)