summaryrefslogtreecommitdiffstats
path: root/Modules/posixmodule.c
diff options
context:
space:
mode:
authorPhilippe Cerfon <41550983+philcerf@users.noreply.github.com>2023-11-03 09:37:46 (GMT)
committerGitHub <noreply@github.com>2023-11-03 09:37:46 (GMT)
commit7810b6981ac663b77bc9ee9dc4b1960ec6845ea7 (patch)
tree5baaf74e157853bbb91da24bdeb02fca6bba5dee /Modules/posixmodule.c
parent7bcf184dacf5cfbcb16b4c2735472314b03a009e (diff)
downloadcpython-7810b6981ac663b77bc9ee9dc4b1960ec6845ea7.zip
cpython-7810b6981ac663b77bc9ee9dc4b1960ec6845ea7.tar.gz
cpython-7810b6981ac663b77bc9ee9dc4b1960ec6845ea7.tar.bz2
gh-90026: support XATTRs on Cygwin (GH-105075)
Diffstat (limited to 'Modules/posixmodule.c')
-rw-r--r--Modules/posixmodule.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
index 8611f8f..45debb9 100644
--- a/Modules/posixmodule.c
+++ b/Modules/posixmodule.c
@@ -292,9 +292,15 @@ corresponding Unix manual entries for more information on calls.");
# undef HAVE_SCHED_SETAFFINITY
#endif
-#if defined(HAVE_SYS_XATTR_H) && defined(HAVE_LINUX_LIMITS_H) && !defined(__FreeBSD_kernel__) && !defined(__GNU__)
-# define USE_XATTRS
-# include <linux/limits.h> // Needed for XATTR_SIZE_MAX on musl libc.
+#if defined(HAVE_SYS_XATTR_H)
+# if defined(HAVE_LINUX_LIMITS_H) && !defined(__FreeBSD_kernel__) && !defined(__GNU__)
+# define USE_XATTRS
+# include <linux/limits.h> // Needed for XATTR_SIZE_MAX on musl libc.
+# endif
+# if defined(__CYGWIN__)
+# define USE_XATTRS
+# include <cygwin/limits.h> // Needed for XATTR_SIZE_MAX and XATTR_LIST_MAX.
+# endif
#endif
#ifdef USE_XATTRS