Mercurial > hg
changeset 7136:d834ed27199f
_listdir only uses dfd if AT_SYMLINK_NOFOLLOW is defined
author | Brendan Cully <brendan@kublai.com> |
---|---|
date | Sat, 18 Oct 2008 11:43:45 -0700 |
parents | 06ca03380190 |
children | 0c63b87d9bce 88f1b8081f1c |
files | mercurial/osutil.c |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/osutil.c Sat Oct 18 20:39:08 2008 +0200 +++ b/mercurial/osutil.c Sat Oct 18 11:43:45 2008 -0700 @@ -270,10 +270,13 @@ { PyObject *list, *elem, *stat, *ret = NULL; char fullpath[PATH_MAX + 10]; - int kind, dfd = -1, err; + int kind, err; struct stat st; struct dirent *ent; DIR *dir; +#ifdef AT_SYMLINK_NOFOLLOW + int dfd = -1; +#endif if (pathlen >= PATH_MAX) { PyErr_SetString(PyExc_ValueError, "path too long");