Skip to content

Commit 4a173bc

Browse files
committed
Fixes for KFreeBSD and the Hurd:
- Issue python#21274: Define PATH_MAX for GNU/Hurd in Python/pythonrun.c. - Issue python#21276: posixmodule: Don't define USE_XATTRS on KFreeBSD and the Hurd. - Issue python#21275: Fix a socket test on KFreeBSD.
1 parent a3818a3 commit 4a173bc

4 files changed

Lines changed: 15 additions & 2 deletions

File tree

Lib/test/test_socket.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -867,7 +867,7 @@ def testGetServBy(self):
867867
# Find one service that exists, then check all the related interfaces.
868868
# I've ordered this by protocols that have both a tcp and udp
869869
# protocol, at least for modern Linuxes.
870-
if (sys.platform.startswith(('freebsd', 'netbsd'))
870+
if (sys.platform.startswith(('freebsd', 'netbsd', 'gnukfreebsd'))
871871
or sys.platform in ('linux', 'darwin')):
872872
# avoid the 'echo' service on this platform, as there is an
873873
# assumption breaking non-standard port/protocol entry

Misc/NEWS

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ Release date: TBA
1010
Core and Builtins
1111
-----------------
1212

13+
- Issue #21274: Define PATH_MAX for GNU/Hurd in Python/pythonrun.c.
14+
1315
- Issue #21209: Fix sending tuples to custom generator objects with the yield
1416
from syntax.
1517

@@ -158,6 +160,11 @@ Library
158160
- Issue #21209: Fix asyncio.tasks.CoroWrapper to workaround a bug
159161
in yield-from implementation in CPythons prior to 3.4.1.
160162

163+
Extension Modules
164+
-----------------
165+
166+
- Issue #21276: posixmodule: Don't define USE_XATTRS on KFreeBSD and the Hurd.
167+
161168
IDLE
162169
----
163170

@@ -200,6 +207,8 @@ Documentation
200207
Tests
201208
-----
202209

210+
- Issue #21275: Fix a socket test on KFreeBSD.
211+
203212
- Issue #21223: Pass test_site/test_startup_imports when some of the extensions
204213
are built as builtins.
205214

Modules/posixmodule.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ corresponding Unix manual entries for more information on calls.");
9292
#undef HAVE_SCHED_SETAFFINITY
9393
#endif
9494

95-
#if defined(HAVE_SYS_XATTR_H) && defined(__GLIBC__)
95+
#if defined(HAVE_SYS_XATTR_H) && defined(__GLIBC__) && !defined(__FreeBSD_kernel__) && !defined(__GNU__)
9696
#define USE_XATTRS
9797
#endif
9898

Python/pythonrun.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@
3535
#define PATH_MAX MAXPATHLEN
3636
#endif
3737

38+
#ifdef __gnu_hurd__
39+
#define PATH_MAX MAXPATHLEN
40+
#endif
41+
3842
_Py_IDENTIFIER(builtins);
3943
_Py_IDENTIFIER(excepthook);
4044
_Py_IDENTIFIER(flush);

0 commit comments

Comments
 (0)