From bebcfdfbe36b040bac029d81372fc92e34bdaf6c Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Thu, 3 Mar 2011 15:06:44 +0000 Subject: Use dirfd() instead of peeking into struct dirent for dd_fd, which is non-standard. --- usr.bin/at/at.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'usr.bin/at') diff --git a/usr.bin/at/at.c b/usr.bin/at/at.c index 0a7f3ac47a4..57ea79de6b5 100644 --- a/usr.bin/at/at.c +++ b/usr.bin/at/at.c @@ -1,4 +1,4 @@ -/* $OpenBSD: at.c,v 1.57 2010/07/02 23:40:09 krw Exp $ */ +/* $OpenBSD: at.c,v 1.58 2011/03/03 15:06:43 millert Exp $ */ /* * at.c : Put file into atrun queue @@ -505,7 +505,7 @@ list_jobs(int argc, char **argv, int count_only, int csort) PRIV_END; - if (fstat(spool->dd_fd, &stbuf) != 0) + if (fstat(dirfd(spool), &stbuf) != 0) perr2("Cannot stat ", AT_DIR); /* -- cgit v1.2.3