https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90337
--- Comment #1 from Fazal Majid <gcc at sentfrom dot com> ---
Another error, due to glob_t having gained some extra fields in newer versions
of Illumos (apparently based on BSD code contributed by Guide van Rossum).
Oracle Solaris:
typedef struct glob_t {
size_t gl_pathc; /* Count of paths matched by pattern */
char **gl_pathv; /* List of matched pathnames */
size_t gl_offs; /* # of slots reserved in gl_pathv */
/* following are internal to the implementation */
char **gl_pathp; /* gl_pathv + gl_offs */
int gl_pathn; /* # of elements allocated */
} glob_t;
Illumos (see also:
https://github.com/illumos/illumos-gate/commit/a5229c74bcec7e2b136379c59a46f4b0717fd516)
typedef struct glob_t {
/*
* Members specified by POSIX
*/
size_t gl_pathc; /* Total count of paths matched by pattern */
char **gl_pathv; /* List of matched pathnames */
size_t gl_offs; /* # of slots reserved in gl_pathv */
/*
* Internal-use members:
*
* NB: The next two members are carried in both the
* libc backward compatibility wrapper functions and
* the extended functions.
*/
char **gl_pathp; /* gl_pathv + gl_offs */
int gl_pathn; /* # of elements allocated */
/*
* Non-POSIX extensions
*
* NB: The following members are not carried in
* the libc backward compatibility wrapper functions.
*/
int gl_matchc; /* Count of paths matching pattern. */
int gl_flags; /* Copy of flags parameter to glob. */
struct stat **gl_statv; /* Stat entries corresponding to gl_pathv */
/*
* Alternate filesystem access methods for glob; replacement
* versions of closedir(3), readdir(3), opendir(3), stat(2)
* and lstat(2).
*/
void (*gl_closedir)(void *);
struct dirent *(*gl_readdir)(void *);
void *(*gl_opendir)(const char *);
int (*gl_lstat)(const char *, struct stat *);
int (*gl_stat)(const char *, struct stat *);
} glob_t;
Patch p2.txt addresses this