diff --git a/srcpkgs/make/patches/fix-glob-dtype.patch b/srcpkgs/make/patches/fix-glob-dtype.patch new file mode 100644 index 00000000000..56c4e6c0505 --- /dev/null +++ b/srcpkgs/make/patches/fix-glob-dtype.patch @@ -0,0 +1,31 @@ +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. + +http://www.openwall.com/lists/musl/2018/03/13/1 + +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 + diff --git a/srcpkgs/make/template b/srcpkgs/make/template index 2de7984c601..d6fd30961ac 100644 --- a/srcpkgs/make/template +++ b/srcpkgs/make/template @@ -1,7 +1,7 @@ # Template file for 'make' pkgname=make version=4.2.1 -revision=4 +revision=5 bootstrap=yes build_style=gnu-configure configure_args="$(vopt_with guile)"