summaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2018-03-14 21:54:59 -0700
committerMichael Forney <mforney@mforney.org>2018-03-14 23:16:34 -0700
commit5c2fc054a466c98fb93c494ccce19dac2b48c183 (patch)
treeb9f571a544efa65257214eafac7da1e0e7ce9726 /pkg
parentb99ef6bfc544b340d6ea0d07b82f764539cc62e9 (diff)
make: Add patch to fix bug with musl 1.1.19
Diffstat (limited to 'pkg')
-rw-r--r--pkg/make/patch/0001-Fix-bug-in-glob-glob.c-with-_DIRENT_HAVE_D_TYPE.patch40
-rw-r--r--pkg/make/rev2
2 files changed, 41 insertions, 1 deletions
diff --git a/pkg/make/patch/0001-Fix-bug-in-glob-glob.c-with-_DIRENT_HAVE_D_TYPE.patch b/pkg/make/patch/0001-Fix-bug-in-glob-glob.c-with-_DIRENT_HAVE_D_TYPE.patch
new file mode 100644
index 00000000..a59c9f54
--- /dev/null
+++ b/pkg/make/patch/0001-Fix-bug-in-glob-glob.c-with-_DIRENT_HAVE_D_TYPE.patch
@@ -0,0 +1,40 @@
+From 5c66224b1611f68c17199e0ac3fcddc271a587be Mon Sep 17 00:00:00 2001
+From: Rich Felker <dalias@libc.org>
+Date: Tue, 13 Mar 2018 13:18:51 -0400
+Subject: [PATCH] Fix bug in glob/glob.c with _DIRENT_HAVE_D_TYPE
+
+musl 1.1.19 introduced the _DIRENT_HAVE_D_* macros in commit
+1bc10ffeaa7c7ce44b3e214e02e302642511c7c7, triggering a bug in GNU make
+that's present up to the current version:
+
+http://git.savannah.gnu.org/cgit/make.git/tree/glob/glob.c?id=5d653b535a0e0e607c8be2016bcaadd6f326a698#n1333
+
+The glob replacement they ship includes and uses internally a
+GLOB_ONLYDIR flag, which is opportunistic and implemented via d_type
+if _DIRENT_HAVE_D_TYPE is defined, and it fails to consider that
+DT_LNK could be a symlink to a directory. This is an ancient version
+of glob.c; the modern GNU glob in glibc rightly considers DT_LNK. Thus
+the bug is not seen on glibc systems (where the glob replacement is
+not used), but will be seen on any system where _DIRENT_HAVE_D_TYPE is
+defined and where configure decides to replace the libc glob with
+their GNU one.
+---
+ glob/glob.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/glob/glob.c b/glob/glob.c
+index f3911bc..d6bb8ba 100644
+--- a/glob/glob.c
++++ b/glob/glob.c
+@@ -1330,7 +1330,7 @@ glob_in_dir (pattern, directory, flags, errfunc, pglob)
+ /* If we shall match only directories use the information
+ provided by the dirent call if possible. */
+ if ((flags & GLOB_ONLYDIR)
+- && d->d_type != DT_UNKNOWN && d->d_type != DT_DIR)
++ && d->d_type != DT_UNKNOWN && d->d_type != DT_DIR && d->d_type != DT_LNK)
+ continue;
+ #endif
+
+--
+2.16.2
+
diff --git a/pkg/make/rev b/pkg/make/rev
index d00491fd..0cfbf088 100644
--- a/pkg/make/rev
+++ b/pkg/make/rev
@@ -1 +1 @@
-1
+2