--- mono/mono/io-layer/wapi_glob.c +++ mono/mono/io-layer/wapi_glob.c @@ -300,7 +300,7 @@ pathv[pglob->gl_offs + pglob->gl_pathc] = NULL; if ((pglob->gl_flags & WAPI_GLOB_LIMIT) && - newsize + *limitp >= ARG_MAX) { + newsize + *limitp >= sysconf (_SC_ARG_MAX)) { errno = 0; return(WAPI_GLOB_NOSPACE); }