History

mercurial: use new d_stat from dirent structure in osutil.listdir

cinap_lenrek committed 10 years ago

Commit ec8c4381 parent 49f75401 file · +4 −0Browse files

Showing the changes to sys/src/cmd/python (1 of 1 file). Show all

Unified · Split

sys/src/cmd/python/Extra/mercurial/osutil.c+4−0
@@ -318,6 +318,9 @@ static PyObject *_listdir(char *path, int pathlen, int keepstat, char *skip) · 317 unmodified lines
318318
319319 kind = entkind(ent);
320320 if (kind == -1 || keepstat) {
321+#ifdef PLAN9APE
322+ st = ent->d_stat;
323+#else
321324 #ifdef AT_SYMLINK_NOFOLLOW
322325 err = fstatat(dfd, ent->d_name, &st,
323326 AT_SYMLINK_NOFOLLOW);
@@ -335,6 +338,7 @@ static PyObject *_listdir(char *path, int pathlen, int keepstat, char *skip) · 11 unmodified lines
335338 fullpath);
336339 goto error;
337340 }
341+#endif
338342 kind = st.st_mode & S_IFMT;
339343 }
340344