summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2005-07-03 07:14:05 +0000
committerPaul Eggert <eggert@cs.ucla.edu>2005-07-03 07:14:05 +0000
commitf21950385bab4eef15a0c548b880c999bf899166 (patch)
tree5b8495fe5bb7f11223f25b4f28eb9c0af9ffd576 /lib
parent98088e6a60a525b3c189a72cb0c1ab8784d8e4c0 (diff)
downloadcoreutils-f21950385bab4eef15a0c548b880c999bf899166.tar.xz
(fd_safer): Remove decl.
Include fcntl--.h rather than unistd-safer.h (fts_safe_changedir): Don't call fd_safer; no longer needed now that we include fcntl--.h.
Diffstat (limited to 'lib')
-rw-r--r--lib/fts.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/fts.c b/lib/fts.c
index d3bef85f3..80fd979bb 100644
--- a/lib/fts.c
+++ b/lib/fts.c
@@ -152,10 +152,9 @@ static bool enter_dir (FTS *fts, FTSENT *ent) { return true; }
static void leave_dir (FTS *fts, FTSENT *ent) {}
static bool setup_dir (FTS *fts) { return true; }
static void free_dir (FTS *fts) {}
-static int fd_safer (int fd) { return fd; }
#else
+# include "fcntl--.h"
# include "fts-cycle.c"
-# include "unistd-safer.h"
#endif
#ifndef MAX
@@ -1319,7 +1318,7 @@ fts_safe_changedir (FTS *sp, FTSENT *p, int fd, char const *dir)
newfd = fd;
if (ISSET(FTS_NOCHDIR))
return (0);
- if (fd < 0 && (newfd = fd_safer (diropen (dir))) < 0)
+ if (fd < 0 && (newfd = diropen (dir)) < 0)
return (-1);
if (fstat(newfd, &sb)) {
ret = -1;