diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2005-04-11 20:12:01 +0000 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2005-04-11 20:12:01 +0000 |
commit | 99eb6d3a02a3425a1a0a7e1d6c42ae4234e7bea9 (patch) | |
tree | faa6b2dd9a9c702df3e4d190c7a585bee22c779c | |
parent | 9db4c897008075b9422f4a44ce93f7832ab08d4d (diff) | |
download | coreutils-99eb6d3a02a3425a1a0a7e1d6c42ae4234e7bea9.tar.xz |
Include unistd-safer.h rather than fcntl-safer.h.
(recheck, tail_file): Use fd_safer rather than open_safer.
-rw-r--r-- | src/tail.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/tail.c b/src/tail.c index 9a94a4d8e..38b57ff58 100644 --- a/src/tail.c +++ b/src/tail.c @@ -35,11 +35,11 @@ #include "argmatch.h" #include "c-strtod.h" #include "error.h" -#include "fcntl-safer.h" #include "inttostr.h" #include "posixver.h" #include "quote.h" #include "safe-read.h" +#include "unistd-safer.h" #include "xnanosleep.h" #include "xstrtol.h" #include "xstrtod.h" @@ -856,7 +856,8 @@ recheck (struct File_spec *f, bool blocking) bool new_file; int fd = (is_stdin ? STDIN_FILENO - : open_safer (f->name, O_RDONLY | (blocking ? 0 : O_NONBLOCK))); + : fd_safer (open (f->name, + O_RDONLY | (blocking ? 0 : O_NONBLOCK)))); assert (valid_file_spec (f)); @@ -1286,7 +1287,7 @@ tail_file (struct File_spec *f, uintmax_t n_units) } else { - fd = open_safer (f->name, O_RDONLY); + fd = fd_safer (open (f->name, O_RDONLY)); } f->tailable = !(reopen_inaccessible_files && fd == -1); |