summaryrefslogtreecommitdiffstats
path: root/usr.sbin/lpr/common_source
diff options
context:
space:
mode:
authorgleb <gleb@FreeBSD.org>2012-05-19 12:44:27 +0000
committergleb <gleb@FreeBSD.org>2012-05-19 12:44:27 +0000
commit53af2dbdcaab2b0af0595c7972b876b8ef9e9ae6 (patch)
tree52b234943a3ae78c62d839ca39a00589e970906a /usr.sbin/lpr/common_source
parent9409c11a935c0490bedd5a31b003a34bb8caea1f (diff)
downloadFreeBSD-src-53af2dbdcaab2b0af0595c7972b876b8ef9e9ae6.zip
FreeBSD-src-53af2dbdcaab2b0af0595c7972b876b8ef9e9ae6.tar.gz
Hide DIR definition by making it an opaque struct typedef.
Introduce dirfd() libc exported symbol replacing macro with same name, preserve _dirfd() macro for internal use. Replace dirp->dd_fd with dirfd() call. Avoid using dirfd as variable name to prevent shadowing global symbol. Sponsored by: Google Summer Of Code 2011
Diffstat (limited to 'usr.sbin/lpr/common_source')
-rw-r--r--usr.sbin/lpr/common_source/common.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.sbin/lpr/common_source/common.c b/usr.sbin/lpr/common_source/common.c
index d28ac1f..819d7dd 100644
--- a/usr.sbin/lpr/common_source/common.c
+++ b/usr.sbin/lpr/common_source/common.c
@@ -130,7 +130,7 @@ getq(const struct printer *pp, struct jobqueue *(*namelist[]))
seteuid(uid);
return (-1);
}
- if (fstat(dirp->dd_fd, &stbuf) < 0)
+ if (fstat(dirfd(dirp), &stbuf) < 0)
goto errdone;
seteuid(uid);
OpenPOWER on IntegriCloud