Module Name:    src
Committed By:   sjg
Date:           Mon Nov 30 23:37:56 UTC 2015

Modified Files:
        src/usr.bin/make: meta.c

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

Patch from bdrewery at FreeBSD.org


To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.41 src/usr.bin/make/meta.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/make/meta.c
diff -u src/usr.bin/make/meta.c:1.40 src/usr.bin/make/meta.c:1.41
--- src/usr.bin/make/meta.c:1.40	Sun Oct 11 04:51:24 2015
+++ src/usr.bin/make/meta.c	Mon Nov 30 23:37:56 2015
@@ -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 @@ meta_oodate(GNode *gn, Boolean oodate)
 		    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;

Reply via email to