]> sourceware.org Git - newlib-cygwin.git/commitdiff
Cygwin: Fix building of utils testsuite
authorJon Turney <jon.turney@dronecode.org.uk>
Mon, 30 Nov 2020 16:58:02 +0000 (16:58 +0000)
committerJon Turney <jon.turney@dronecode.org.uk>
Wed, 2 Dec 2020 15:31:57 +0000 (15:31 +0000)
Avoid referencing undefined max_mount_entry.

winsup/utils/path.cc
winsup/utils/path.h

index d8c2081235e52a34438b2387326f50eb750498d7..4c1bb4029da5bb73c63e4b25dbeb964fe0c73b08 100644 (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;
 }
 
index af5deeba62b15da896e3ce68edd88b5ae74fc099..a1840a00395a97e2ac998998aba7d63784557cfd 100644 (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 */
This page took 0.03392 seconds and 5 git commands to generate.