summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr.bin/oldrdist/expand.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/oldrdist/expand.c b/usr.bin/oldrdist/expand.c
index e07ecd0e036..a634c5b8263 100644
--- a/usr.bin/oldrdist/expand.c
+++ b/usr.bin/oldrdist/expand.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: expand.c,v 1.13 2011/04/06 11:36:26 miod Exp $ */
+/* $OpenBSD: expand.c,v 1.14 2011/07/22 18:26:18 matthew Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -300,7 +300,7 @@ matchdir(pattern)
return;
goto patherr2;
}
- if (fstat(dirp->dd_fd, &stb) < 0)
+ if (fstat(dirfd(dirp), &stb) < 0)
goto patherr1;
if (!ISDIR(stb.st_mode)) {
errno = ENOTDIR;