summaryrefslogtreecommitdiffstats
path: root/Modules/_posixsubprocess.c
diff options
context:
space:
mode:
authorGregory P. Smith <greg@krypto.org>2012-06-05 20:30:24 (GMT)
committerGregory P. Smith <greg@krypto.org>2012-06-05 20:30:24 (GMT)
commit902274e9483fb1e179f128b0d5eaafdcae4a4798 (patch)
treed4406a2108efe6554445c3410682776428dc4975 /Modules/_posixsubprocess.c
parent9844993cde5d8572d8e611d8b437a2e45e841414 (diff)
parent58f07a9d6d2aa7b5d624ef23cc89c99071fa249f (diff)
downloadcpython-902274e9483fb1e179f128b0d5eaafdcae4a4798.zip
cpython-902274e9483fb1e179f128b0d5eaafdcae4a4798.tar.gz
cpython-902274e9483fb1e179f128b0d5eaafdcae4a4798.tar.bz2
Fixes issue #15000: support the odd x32 abi on posixsubprocess's system call.
Diffstat (limited to 'Modules/_posixsubprocess.c')
-rw-r--r--Modules/_posixsubprocess.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/Modules/_posixsubprocess.c b/Modules/_posixsubprocess.c
index 8d3af6e..4a14788 100644
--- a/Modules/_posixsubprocess.c
+++ b/Modules/_posixsubprocess.c
@@ -177,8 +177,15 @@ _close_fds_by_brute_force(int start_fd, int end_fd, PyObject *py_fds_to_keep)
* chooses to break compatibility with all existing binaries. Highly Unlikely.
*/
struct linux_dirent {
+#if defined(__x86_64__) && defined(__ILP32__)
+ /* Support the wacky x32 ABI (fake 32-bit userspace speaking to x86_64
+ * kernel interfaces) - https://sites.google.com/site/x32abi/ */
+ unsigned long long d_ino;
+ unsigned long long d_off;
+#else
unsigned long d_ino; /* Inode number */
unsigned long d_off; /* Offset to next linux_dirent */
+#endif
unsigned short d_reclen; /* Length of this linux_dirent */
char d_name[256]; /* Filename (null-terminated) */
};