# Bug report `posixmodule.c` detects xattr support by checking for `__GLIBC__` (and some other conditions) at https://github.com/python/cpython/blob/86ebd5c3fa9ac0fba3b651f1d4abfca79614af5f/Modules/posixmodule.c#L277. This incorrectly excludes the musl libc,which supports xattr functionality. On a musl system, it's easy to reproduce with: ``` >>> import os >>> os.listxattr Traceback (most recent call last): File "", line 1, in AttributeError: module 'os' has no attribute 'listxattr' ``` # Your environment - CPython versions tested on: 3.10.10/3.11.2/3.12.0_alpha5 - Operating system and architecture: Gentoo Linux, amd64, musl libc (not glibc) - Downstream report in Gentoo: https://bugs.gentoo.org/894130 - Report in a Python-using project: https://github.com/GNS3/gns3-gui/issues/1392 <!-- gh-linked-prs --> ### Linked PRs * gh-101858 * gh-101894 <!-- /gh-linked-prs -->
Bug report
posixmodule.cdetects xattr support by checking for__GLIBC__(and some other conditions) atcpython/Modules/posixmodule.c
Line 277 in 86ebd5c
On a musl system, it's easy to reproduce with:
Your environment
Linked PRs