Author: Armin Rigo <ar...@tunes.org>
Branch: py3.5
Changeset: r90487:f3ed9df206eb
Date: 2017-03-02 15:53 +0100
http://bitbucket.org/pypy/pypy/changeset/f3ed9df206eb/

Log:    no fstatat() function on OS/X

diff --git a/pypy/module/posix/interp_scandir.py 
b/pypy/module/posix/interp_scandir.py
--- a/pypy/module/posix/interp_scandir.py
+++ b/pypy/module/posix/interp_scandir.py
@@ -161,7 +161,7 @@
         if (self.flags & FLAG_LSTAT) == 0:
             # Unlike CPython, try to use fstatat() if possible
             dirfd = self.scandir_iterator.dirfd
-            if dirfd != -1:
+            if dirfd != -1 and rposix.HAVE_FSTATAT:
                 st = rposix_stat.fstatat(self.name, dirfd,
                                          follow_symlinks=False)
             else:
@@ -206,7 +206,7 @@
             if must_call_stat:
                 # Must call stat().  Try to use fstatat() if possible
                 dirfd = self.scandir_iterator.dirfd
-                if dirfd != -1:
+                if dirfd != -1 and rposix.HAVE_FSTATAT:
                     st = rposix_stat.fstatat(self.name, dirfd,
                                              follow_symlinks=True)
                 else:
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to