diff -u make-dfsg-4.1/configure.ac make-dfsg-4.1/configure.ac --- make-dfsg-4.1/configure.ac +++ make-dfsg-4.1/configure.ac @@ -402,10 +402,9 @@ #include #include -#define GLOB_INTERFACE_VERSION 1 #if !defined _LIBC && defined __GNU_LIBRARY__ && __GNU_LIBRARY__ > 1 # include -# if _GNU_GLOB_INTERFACE_VERSION == GLOB_INTERFACE_VERSION +# if _GNU_GLOB_INTERFACE_VERSION == 1 || _GNU_GLOB_INTERFACE_VERSION == 2 gnu glob # endif #endif], diff -u make-dfsg-4.1/debian/changelog make-dfsg-4.1/debian/changelog --- make-dfsg-4.1/debian/changelog +++ make-dfsg-4.1/debian/changelog @@ -1,3 +1,11 @@ +make-dfsg (4.1-9.1ubuntu1) bionic; urgency=medium + + * Cherry-pick two patches from upstream to support the glob implementation + in glibc 2.27. Kindly supplied by Aurelien Jarno on Debian bug #891365, + with thanks. + + -- Iain Lane Tue, 17 Apr 2018 13:12:28 +0100 + make-dfsg (4.1-9.1) unstable; urgency=medium * Non-maintainer upload. diff -u make-dfsg-4.1/dir.c make-dfsg-4.1/dir.c --- make-dfsg-4.1/dir.c +++ make-dfsg-4.1/dir.c @@ -1215,15 +1215,40 @@ } #endif +/* Similarly for lstat. */ +#if !defined(lstat) && !defined(WINDOWS32) || defined(VMS) +# ifndef VMS +# ifndef HAVE_SYS_STAT_H +int lstat (const char *path, struct stat *sbuf); +# endif +# else + /* We are done with the fake lstat. Go back to the real lstat */ +# ifdef lstat +# undef lstat +# endif +# endif +# define local_lstat lstat +#elif defined(WINDOWS32) +/* Windows doesn't support lstat(). */ +# define local_lstat local_stat +#else +static int +local_lstat (const char *path, struct stat *buf) +{ + int e; + EINTRLOOP (e, lstat (path, buf)); + return e; +} +#endif + void dir_setup_glob (glob_t *gl) { gl->gl_opendir = open_dirstream; gl->gl_readdir = read_dirstream; gl->gl_closedir = free; + gl->gl_lstat = local_lstat; gl->gl_stat = local_stat; - /* We don't bother setting gl_lstat, since glob never calls it. - The slot is only there for compatibility with 4.4 BSD. */ } void