summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormatthew <matthew@openbsd.org>2011-07-22 18:26:18 +0000
committermatthew <matthew@openbsd.org>2011-07-22 18:26:18 +0000
commit0633db5bb0946be76f771d4ce1cd7af6c230070a (patch)
tree07362b3787eef92114efa50141c6bb25b13cba17
parentsync (diff)
downloadwireguard-openbsd-0633db5bb0946be76f771d4ce1cd7af6c230070a.tar.xz
wireguard-openbsd-0633db5bb0946be76f771d4ce1cd7af6c230070a.zip
Use dirfd(dirp) instead of dirp->dd_fd.
No binary change.
-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;