summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/src/cmd/python/Extra/mercurial/osutil.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/src/cmd/python/Extra/mercurial/osutil.c b/sys/src/cmd/python/Extra/mercurial/osutil.c
index a9874d0c9..d9549a1c9 100644
--- a/sys/src/cmd/python/Extra/mercurial/osutil.c
+++ b/sys/src/cmd/python/Extra/mercurial/osutil.c
@@ -318,6 +318,9 @@ static PyObject *_listdir(char *path, int pathlen, int keepstat, char *skip)
kind = entkind(ent);
if (kind == -1 || keepstat) {
+#ifdef PLAN9APE
+ st = ent->d_stat;
+#else
#ifdef AT_SYMLINK_NOFOLLOW
err = fstatat(dfd, ent->d_name, &st,
AT_SYMLINK_NOFOLLOW);
@@ -335,6 +338,7 @@ static PyObject *_listdir(char *path, int pathlen, int keepstat, char *skip)
fullpath);
goto error;
}
+#endif
kind = st.st_mode & S_IFMT;
}