Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/make Use lstat(2) if we have a link, incase it is a ...



details:   https://anonhg.NetBSD.org/src/rev/5b6d7c28cd59
branches:  trunk
changeset: 812097:5b6d7c28cd59
user:      sjg <sjg%NetBSD.org@localhost>
date:      Mon Nov 30 23:37:56 2015 +0000

description:
Use lstat(2) if we have a link, incase it is a symlink.

Patch from bdrewery at FreeBSD.org

diffstat:

 usr.bin/make/meta.c |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (19 lines):

diff -r e92c6654ba87 -r 5b6d7c28cd59 usr.bin/make/meta.c
--- a/usr.bin/make/meta.c       Mon Nov 30 23:34:47 2015 +0000
+++ b/usr.bin/make/meta.c       Mon Nov 30 23:37:56 2015 +0000
@@ -1,4 +1,4 @@
-/*      $NetBSD: meta.c,v 1.40 2015/10/11 04:51:24 sjg Exp $ */
+/*      $NetBSD: meta.c,v 1.41 2015/11/30 23:37:56 sjg Exp $ */
 
 /*
  * Implement 'meta' mode.
@@ -1183,7 +1183,8 @@
                    if ((strstr("tmp", p)))
                        break;
 
-                   if (stat(p, &fs) < 0) {
+                   if ((link_src != NULL && lstat(p, &fs) < 0) ||
+                       (link_src == NULL && stat(p, &fs) < 0)) {
                        Lst_AtEnd(missingFiles, bmake_strdup(p));
                    }
                    break;



Home | Main Index | Thread Index | Old Index