mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
gh-101857: Allow xattr detection on musl libc (#101858)
Previously, we checked exclusively for `__GLIBC__` (AND'd with some other conditions). Checking for `__linux__` instead should be fine. This fixes using e.g. `os.listxattr()` on systems using musl libc. Bug: https://bugs.gentoo.org/894130 Co-authored-by: Gregory P. Smith <greg@krypto.org>
This commit is contained in:
parent
928752ce4c
commit
8be8101bca
2 changed files with 3 additions and 1 deletions
|
@ -274,8 +274,9 @@ corresponding Unix manual entries for more information on calls.");
|
|||
# undef HAVE_SCHED_SETAFFINITY
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_SYS_XATTR_H) && defined(__GLIBC__) && !defined(__FreeBSD_kernel__) && !defined(__GNU__)
|
||||
#if defined(HAVE_SYS_XATTR_H) && defined(__linux__) && !defined(__FreeBSD_kernel__) && !defined(__GNU__)
|
||||
# define USE_XATTRS
|
||||
# include <linux/limits.h> // Needed for XATTR_SIZE_MAX on musl libc.
|
||||
#endif
|
||||
|
||||
#ifdef USE_XATTRS
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue