1 Work with the new glob interface in glibc 2.27.
3 Taken from this upstream commit:
4 https://git.savannah.gnu.org/cgit/make.git/commit/?id=193f1e81edd6b1b56b0eb0ff8aa4b41c7b4257b4
6 diff --git a/dir.c b/dir.c
7 index adbb8a9..c343e4c 100644
10 @@ -1299,15 +1299,40 @@ local_stat (const char *path, struct stat *buf)
14 +/* Similarly for lstat. */
15 +#if !defined(lstat) && !defined(WINDOWS32) || defined(VMS)
17 +# ifndef HAVE_SYS_STAT_H
18 +int lstat (const char *path, struct stat *sbuf);
21 + /* We are done with the fake lstat. Go back to the real lstat */
26 +# define local_lstat lstat
27 +#elif defined(WINDOWS32)
28 +/* Windows doesn't support lstat(). */
29 +# define local_lstat local_stat
32 +local_lstat (const char *path, struct stat *buf)
35 + EINTRLOOP (e, lstat (path, buf));
41 dir_setup_glob (glob_t *gl)
43 gl->gl_opendir = open_dirstream;
44 gl->gl_readdir = read_dirstream;
45 gl->gl_closedir = free;
46 + gl->gl_lstat = local_lstat;
47 gl->gl_stat = local_stat;
48 - /* We don't bother setting gl_lstat, since glob never calls it.
49 - The slot is only there for compatibility with 4.4 BSD. */