diff options
author | Jon Turney <jon.turney@dronecode.org.uk> | 2020-11-30 16:58:02 +0000 |
---|---|---|
committer | Jon Turney <jon.turney@dronecode.org.uk> | 2020-12-02 15:31:57 +0000 |
commit | 0d0f06416a155de1025e289c56e800de092750c4 (patch) | |
tree | 09deedd9de4f270ce69ad8f5cf75d08284aa6d52 /winsup/utils | |
parent | aec6479820fee5f71d50930bf0dde2bbf386bd4b (diff) | |
download | newlib-0d0f06416a155de1025e289c56e800de092750c4.zip newlib-0d0f06416a155de1025e289c56e800de092750c4.tar.gz newlib-0d0f06416a155de1025e289c56e800de092750c4.tar.bz2 |
Cygwin: Fix building of utils testsuite
Avoid referencing undefined max_mount_entry.
Diffstat (limited to 'winsup/utils')
-rw-r--r-- | winsup/utils/path.cc | 4 | ||||
-rw-r--r-- | winsup/utils/path.h | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/winsup/utils/path.cc b/winsup/utils/path.cc index d8c2081..4c1bb40 100644 --- a/winsup/utils/path.cc +++ b/winsup/utils/path.cc @@ -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; } diff --git a/winsup/utils/path.h b/winsup/utils/path.h index af5deeb..a1840a0 100644 --- a/winsup/utils/path.h +++ b/winsup/utils/path.h @@ -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 */ |