[issue32390] AIX compile error with Modules/posixmodule.c: Function argument assignment between types "unsigned long" and "struct fsid_t" is not allowed

Michael Felt report at bugs.python.org
Wed Jan 3 13:06:06 EST 2018


Michael Felt <michael at felt.demon.nl> added the comment:

On 03/01/2018 18:03, Xavier de Gaye wrote:
> Xavier de Gaye <xdegaye at gmail.com> added the comment:
>
> The following patch may be less invasive and more explicit:
>
> diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
> index 38b6c80e6b..e0bb4ba869 100644
> --- a/Modules/posixmodule.c
> +++ b/Modules/posixmodule.c
> @@ -9325,7 +9325,11 @@ _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
> +#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;
>
> ----------
Applied to the PR. Thx.
> _______________________________________
> Python tracker <report at bugs.python.org>
> <https://bugs.python.org/issue32390>
> _______________________________________
>

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue32390>
_______________________________________


More information about the Python-bugs-list mailing list