Cygwin: Fix building of utils testsuite

Avoid referencing undefined max_mount_entry.
This commit is contained in:
Jon Turney 2020-11-30 16:58:02 +00:00
parent aec6479820
commit 0d0f06416a
No known key found for this signature in database
GPG Key ID: C7C86F0370285C81
2 changed files with 5 additions and 1 deletions

View File

@ -824,8 +824,10 @@ vcygpath (const char *cwd, const char *s, va_list v)
size_t max_len = 0;
mnt_t *m, *match = NULL;
#ifndef TESTSUITE
if (!max_mount_entry)
read_mounts ();
#endif
char *path;
if (s[0] == '.' && isslash (s[1]))
s += 2;
@ -912,8 +914,10 @@ extern "C" FILE *
setmntent (const char *, const char *)
{
m = mount_table;
#ifndef TESTSUITE
if (!max_mount_entry)
read_mounts ();
#endif
return NULL;
}

View File

@ -24,8 +24,8 @@ bool from_fstab_line (mnt_t *m, char *line, bool user);
#ifndef TESTSUITE
extern mnt_t mount_table[255];
#endif
extern int max_mount_entry;
#endif
#ifndef SYMLINK_MAX
#define SYMLINK_MAX 4095 /* PATH_MAX - 1 */