]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
Include unistd-safer.h rather than fcntl-safer.h.
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 11 Apr 2005 20:12:01 +0000 (20:12 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 11 Apr 2005 20:12:01 +0000 (20:12 +0000)
(recheck, tail_file): Use fd_safer rather than open_safer.

src/tail.c

index 9a94a4d8e781dd3191227ba3c822ad24da7ef5d9..38b57ff58af995399bb4d3b8a35b58536bb75a3a 100644 (file)
 #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);