Skip to content

posixmodule.c doesn't detect xattr support on Linux with non-glibc (e.g. musl) #101857

Closed
@thesamesam

Description

@thesamesam

Bug report

posixmodule.c detects xattr support by checking for __GLIBC__ (and some other conditions) at

#if defined(HAVE_SYS_XATTR_H) && defined(__GLIBC__) && !defined(__FreeBSD_kernel__) && !defined(__GNU__)
. 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

Linked PRs

Metadata

Metadata

Assignees

Labels

buildThe build process and cross-buildextension-modulesC modules in the Modules dirtype-bugAn unexpected behavior, bug, or error

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions