diff options
author | Michael Felt <aixtools@users.noreply.github.com> | 2018-01-05 12:01:58 (GMT) |
---|---|---|
committer | xdegaye <xdegaye@gmail.com> | 2018-01-05 12:01:58 (GMT) |
commit | 502d551c6d782963d26957a9e5ff1588946f233f (patch) | |
tree | deb7bc4f293a294b2fcc0ee97f61c7041a2b1ac6 /Modules | |
parent | 94459fd7dc25ce19096f2080eb7339497d319eb0 (diff) | |
download | cpython-502d551c6d782963d26957a9e5ff1588946f233f.zip cpython-502d551c6d782963d26957a9e5ff1588946f233f.tar.gz cpython-502d551c6d782963d26957a9e5ff1588946f233f.tar.bz2 |
bpo-32390: Fix compilation failure on AIX after f_fsid was added to os.statvfs() (#4972)
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/posixmodule.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c index 47b79fc..b0e48da 100644 --- a/Modules/posixmodule.c +++ b/Modules/posixmodule.c @@ -9336,7 +9336,13 @@ _pystatvfs_fromstructstatvfs(struct statvfs st) { PyStructSequence_SET_ITEM(v, 8, PyLong_FromLong((long) st.f_flag)); PyStructSequence_SET_ITEM(v, 9, PyLong_FromLong((long) st.f_namemax)); #endif +/* The _ALL_SOURCE feature test macro defines f_fsid as a structure + * (issue #32390). */ +#if defined(_AIX) && defined(_ALL_SOURCE) + PyStructSequence_SET_ITEM(v, 10, PyLong_FromUnsignedLong(st.f_fsid.val[0])); +#else PyStructSequence_SET_ITEM(v, 10, PyLong_FromUnsignedLong(st.f_fsid)); +#endif if (PyErr_Occurred()) { Py_DECREF(v); return NULL; |