]> granicus.if.org Git - python/commitdiff
Fixes issue #15000: support the odd x32 abi on posixsubprocess's system call.
authorGregory P. Smith <greg@krypto.org>
Tue, 5 Jun 2012 20:26:39 +0000 (13:26 -0700)
committerGregory P. Smith <greg@krypto.org>
Tue, 5 Jun 2012 20:26:39 +0000 (13:26 -0700)
Misc/NEWS
Modules/_posixsubprocess.c

index 1fd7901c1d3876bf7744395eadfc5faa5450ebb7..2890ebee4f7101e5beec3525f765d56ef5795e88 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -275,6 +275,8 @@ Library
 Extension Modules
 -----------------
 
+- Issue #15000: Support the "unique" x32 architecture in _posixsubprocess.c.
+
 - Issue #9041: An issue in ctypes.c_longdouble, ctypes.c_double, and
   ctypes.c_float that caused an incorrect exception to be returned in the
   case of overflow has been fixed.
index 81274e12c8bacaf01e0f5595d60bb2f85558baad..21ad966378de69e625151f6bbc76778aa26687b4 100644 (file)
@@ -175,8 +175,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) */
 };