@@ -118,6 +118,7 @@ def _add(str, fn):
118
118
_add ("HAVE_OPENAT" , "open" )
119
119
_add ("HAVE_READLINKAT" , "readlink" )
120
120
_add ("HAVE_RENAMEAT" , "rename" )
121
+ _add ("HAVE_STATX" , "statx" )
121
122
_add ("HAVE_SYMLINKAT" , "symlink" )
122
123
_add ("HAVE_UNLINKAT" , "unlink" )
123
124
_add ("HAVE_UNLINKAT" , "rmdir" )
@@ -140,6 +141,7 @@ def _add(str, fn):
140
141
_add ("HAVE_FUTIMENS" , "utime" )
141
142
_add ("HAVE_FUTIMES" , "utime" )
142
143
_add ("HAVE_FPATHCONF" , "pathconf" )
144
+ _add ("HAVE_STATX" , "statx" )
143
145
if _exists ("statvfs" ) and _exists ("fstatvfs" ): # mac os x10.3
144
146
_add ("HAVE_FSTATVFS" , "statvfs" )
145
147
supports_fd = _set
@@ -1099,6 +1101,12 @@ def statx(path, mask, *, dir_fd=None, follow_symlinks=True, flags=0):
1099
1101
"""
1100
1102
return (stat if follow_symlinks else lstat )(path , dir_fd = dir_fd )
1101
1103
1104
+ # Ensure our supports sets include us based on the fallback functions
1105
+ supports_fd .add (statx )
1106
+ if stat in supports_follow_symlinks :
1107
+ supports_follow_symlinks .add (statx )
1108
+ if stat in supports_dir_fd :
1109
+ supports_dir_fd .add (statx )
1102
1110
1103
1111
if name == 'nt' :
1104
1112
class _AddedDllDirectory :
0 commit comments