Skip to content

Commit e5b8b19

Browse files
authored
gh-104106: Add gcc fallback of mkfifoat/mknodat for macOS (gh-104129)
1 parent ce871fd commit e5b8b19

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Add gcc fallback of mkfifoat/mknodat for macOS. Patch by Dong-hee Na.

Modules/posixmodule.c

+12-4
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,14 @@
175175
# define HAVE_PWRITEV_RUNTIME (pwritev != NULL)
176176
# endif
177177

178+
# ifdef HAVE_MKFIFOAT
179+
# define HAVE_MKFIFOAT_RUNTIME (mkfifoat != NULL)
180+
# endif
181+
182+
# ifdef HAVE_MKNODAT
183+
# define HAVE_MKNODAT_RUNTIME (mknodat != NULL)
184+
# endif
185+
178186
#endif
179187

180188
#ifdef HAVE_FUTIMESAT
@@ -4802,7 +4810,7 @@ os__path_isdir_impl(PyObject *module, PyObject *path)
48024810
}
48034811

48044812
Py_BEGIN_ALLOW_THREADS
4805-
if (_path.wide) {
4813+
if (_path.wide) {
48064814
if (_Py_GetFileInformationByName(_path.wide, FileStatBasicByNameInfo,
48074815
&statInfo, sizeof(statInfo))) {
48084816
if (!(statInfo.FileAttributes & FILE_ATTRIBUTE_REPARSE_POINT)) {
@@ -4899,7 +4907,7 @@ os__path_isfile_impl(PyObject *module, PyObject *path)
48994907
}
49004908

49014909
Py_BEGIN_ALLOW_THREADS
4902-
if (_path.wide) {
4910+
if (_path.wide) {
49034911
if (_Py_GetFileInformationByName(_path.wide, FileStatBasicByNameInfo,
49044912
&statInfo, sizeof(statInfo))) {
49054913
if (!(statInfo.FileAttributes & FILE_ATTRIBUTE_REPARSE_POINT)) {
@@ -4995,7 +5003,7 @@ os__path_exists_impl(PyObject *module, PyObject *path)
49955003
}
49965004

49975005
Py_BEGIN_ALLOW_THREADS
4998-
if (_path.wide) {
5006+
if (_path.wide) {
49995007
if (_Py_GetFileInformationByName(_path.wide, FileStatBasicByNameInfo,
50005008
&statInfo, sizeof(statInfo))) {
50015009
if (!(statInfo.FileAttributes & FILE_ATTRIBUTE_REPARSE_POINT)) {
@@ -5082,7 +5090,7 @@ os__path_islink_impl(PyObject *module, PyObject *path)
50825090
}
50835091

50845092
Py_BEGIN_ALLOW_THREADS
5085-
if (_path.wide) {
5093+
if (_path.wide) {
50865094
if (_Py_GetFileInformationByName(_path.wide, FileStatBasicByNameInfo,
50875095
&statInfo, sizeof(statInfo))) {
50885096
slow_path = FALSE;

0 commit comments

Comments
 (0)