lbry-fdroid/p4a/pythonforandroid/recipes/python3/patches/python-3.4.2-android-missing-getdents64-definition.patch

18 lines
611 B
Diff
Raw Normal View History

2017-08-13 03:24:00 +02:00
diff -ru Python-3.3.5/Modules/_posixsubprocess.c Python-3.3.5-android/Modules/_posixsubprocess.c
--- Python-3.3.5/Modules/_posixsubprocess.c 2014-03-09 09:40:26.000000000 +0100
+++ Python-3.3.5-android/Modules/_posixsubprocess.c 2014-08-04 22:19:36.000000000 +0200
@@ -18,6 +18,12 @@
#include <dirent.h>
#endif
+#if defined(__ANDROID__)
+/* Android doesn't expose syscalls. Let's 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