]> sjero.net Git - wget/blobdiff - src/utils.c
Fallback to PATH_MAX when pathconf is not available
[wget] / src / utils.c
index 729ec50d96275952642c295d01601b5273575de0..faae62e1b334b93422dd0fa2f5fb8f1880b99e79 100644 (file)
@@ -2509,9 +2509,13 @@ get_max_length (const char *path, int length, int name)
     {
       errno = 0;
       /* For an empty path query the current directory. */
+#if HAVE_PATHCONF
       ret = pathconf (*p ? p : ".", name);
       if (!(ret < 0 && errno == ENOENT))
         break;
+#else
+      ret = PATH_MAX;
+#endif
 
       /* The path does not exist yet, but may be created. */
       /* Already at current or root directory, give up. */