Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 2e457bc

Browse filesBrowse files
miss-islingtonthesamesamgpshead
authored
[3.11] gh-101857: Allow xattr detection on musl libc (GH-101858) (#101894)
gh-101857: Allow xattr detection on musl libc (GH-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 (cherry picked from commit 8be8101) Co-authored-by: Sam James <sam@gentoo.org> Co-authored-by: Gregory P. Smith <greg@krypto.org>
1 parent d45c1df commit 2e457bc
Copy full SHA for 2e457bc

File tree

Expand file treeCollapse file tree

2 files changed

+3
-1
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+3
-1
lines changed
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix xattr support detection on Linux systems by widening the check to linux, not just glibc. This fixes support for musl.

‎Modules/posixmodule.c

Copy file name to clipboardExpand all lines: Modules/posixmodule.c
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,8 +280,9 @@ corresponding Unix manual entries for more information on calls.");
280280
# undef HAVE_SCHED_SETAFFINITY
281281
#endif
282282

283-
#if defined(HAVE_SYS_XATTR_H) && defined(__GLIBC__) && !defined(__FreeBSD_kernel__) && !defined(__GNU__)
283+
#if defined(HAVE_SYS_XATTR_H) && defined(__linux__) && !defined(__FreeBSD_kernel__) && !defined(__GNU__)
284284
# define USE_XATTRS
285+
# include <linux/limits.h> // Needed for XATTR_SIZE_MAX on musl libc.
285286
#endif
286287

287288
#ifdef USE_XATTRS

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.