summaryrefslogtreecommitdiff
path: root/openbsd-compat
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2005-11-10 17:15:06 +1100
committerDarren Tucker <dtucker@zip.com.au>2005-11-10 17:15:06 +1100
commit0a149d19d3ca291c33f449c304d4b0c5601c127a (patch)
treedd1df512463158d0cfde65dd806d13677e8e14d8 /openbsd-compat
parent31ba53e333458abda2337f5d3ded0205485bd355 (diff)
- (dtucker) [openbsd-compat/getcwd.c] Replace lstat with fstat to match up
with OpenBSD code since we don't support platforms without fstat any more.
Diffstat (limited to 'openbsd-compat')
-rw-r--r--openbsd-compat/getcwd.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/openbsd-compat/getcwd.c b/openbsd-compat/getcwd.c
index 9354f7ae4..711cb9cd5 100644
--- a/openbsd-compat/getcwd.c
+++ b/openbsd-compat/getcwd.c
@@ -144,10 +144,8 @@ getcwd(char *pt, size_t size)
144 *bup++ = '.'; 144 *bup++ = '.';
145 *bup = '\0'; 145 *bup = '\0';
146 146
147 /* Open and stat parent directory. 147 /* Open and stat parent directory. */
148 * RACE?? - replaced fstat(dirfd(dir), &s) w/ lstat(up,&s) 148 if (!(dir = opendir(up)) || fstat(dirfd(dir), &s))
149 */
150 if (!(dir = opendir(up)) || lstat(up,&s))
151 goto err; 149 goto err;
152 150
153 /* Add trailing slash for next directory. */ 151 /* Add trailing slash for next directory. */