Mercurial > public > mercurial-scm > hg
diff mercurial/osutil.c @ 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 | 8a5c88c7e97b |
children | aecea6934fdd |
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");