svn commit: r536096 - in head/devel/gmake: . files
Tijl Coosemans
tijl at FreeBSD.org
Thu May 21 09:50:37 UTC 2020
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)
More information about the svn-ports-head
mailing list