]> git.ipfire.org Git - thirdparty/make.git/commitdiff
(construct_include_path): Use safe_stat in place of stat.
authorRoland McGrath <roland@redhat.com>
Mon, 4 Jul 1994 21:55:13 +0000 (21:55 +0000)
committerRoland McGrath <roland@redhat.com>
Mon, 4 Jul 1994 21:55:13 +0000 (21:55 +0000)
read.c

diff --git a/read.c b/read.c
index 4c74e9881cf7ad1b534df4afb721a581be58ee8c..6b7d12213d18b20835b3728be24c1af199aa5d6e 100644 (file)
--- a/read.c
+++ b/read.c
@@ -1799,7 +1799,7 @@ construct_include_path (arg_dirs)
              dir = expanded;
          }
 
-       if (stat (dir, &stbuf) == 0 && S_ISDIR (stbuf.st_mode))
+       if (safe_stat (dir, &stbuf) == 0 && S_ISDIR (stbuf.st_mode))
          {
            if (idx == max - 1)
              {
@@ -1816,7 +1816,7 @@ construct_include_path (arg_dirs)
   /* Now add at the end the standard default dirs.  */
 
   for (i = 0; default_include_directories[i] != 0; ++i)
-    if (stat (default_include_directories[i], &stbuf) == 0
+    if (safe_stat (default_include_directories[i], &stbuf) == 0
        && S_ISDIR (stbuf.st_mode))
       dirs[idx++] = default_include_directories[i];