Date: Thu, 21 May 2020 09:50:36 +0000 (UTC) From: Tijl Coosemans <tijl@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r536096 - in head/devel/gmake: . files Message-ID: <202005210950.04L9oafI056401@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: tijl Date: Thu May 21 09:50:36 2020 New Revision: 536096 URL: https://svnweb.freebsd.org/changeset/ports/536096 Log: Add backport of gnulib git commit 4c1009ec93e12ee34acd27f6d7e25442bedc16f2. When the file found in a PATH element is a directory, continue searching. PR: 246615 Submitted by: jkim Obtained from: https://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=4c1009ec93e12ee34acd27f6d7e25442bedc16f2 Added: head/devel/gmake/files/patch-10-4c1009ec (contents, props changed) Modified: head/devel/gmake/Makefile Modified: head/devel/gmake/Makefile ============================================================================== --- head/devel/gmake/Makefile Thu May 21 09:50:19 2020 (r536095) +++ head/devel/gmake/Makefile Thu May 21 09:50:36 2020 (r536096) @@ -3,6 +3,7 @@ PORTNAME= gmake PORTVERSION= 4.3 +PORTREVISION= 1 CATEGORIES= devel MASTER_SITES= GNU/make DISTNAME= make-${PORTVERSION} Added: head/devel/gmake/files/patch-10-4c1009ec ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/gmake/files/patch-10-4c1009ec Thu May 21 09:50:36 2020 (r536096) @@ -0,0 +1,32 @@ +Backport of gnulib git commit 4c1009ec93e12ee34acd27f6d7e25442bedc16f2. + +When the file found in a PATH element is a directory, continue searching. + +--- lib/findprog-in.c.orig 2020-01-19 20:34:01 UTC ++++ lib/findprog-in.c +@@ -26,6 +26,7 @@ + #include <stdlib.h> + #include <string.h> + #include <unistd.h> ++#include <sys/stat.h> + + #include "filename.h" + #include "concat-filename.h" +@@ -190,6 +191,7 @@ find_in_given_path (const char *progname, const char * + dir = "."; + + /* Try all platform-dependent suffixes. */ ++ struct stat st; + for (i = 0; i < sizeof (suffixes) / sizeof (suffixes[0]); i++) + { + const char *suffix = suffixes[i]; +@ -208,7 +210,8 @@ find_in_given_path (const char *progname, const char * + use it. On other systems, let's hope that this program + is not installed setuid or setgid, so that it is ok to + call access() despite its design flaw. */ +- if (eaccess (progpathname, X_OK) == 0) ++ if (eaccess (progpathname, X_OK) == 0 && ++ stat(progpathname, &st) == 0 && ! S_ISDIR(st.st_mode)) + { + /* Found! */ + if (strcmp (progpathname, progname) == 0)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202005210950.04L9oafI056401>