lbry-fdroid/p4a/pythonforandroid/recipes/python3/patches/python-3.4.2-android-missing-getdents64-definition.patch
Akinwale Ariwodola 744cfaebc2 Initial commit
2017-08-13 02:24:00 +01:00

17 lines
611 B
Diff

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