# HG changeset patch # User Igor Sysoev # Date 1219770911 0 # Node ID 2cae41e51622d85a18ef1c9e918914cbfe6f2e6b # Parent da860de4ff74d442a67b2dd6b157d863d78b2ac8 fix build on Linux and Solaris introduced in r2200 diff -r da860de4ff74 -r 2cae41e51622 src/os/unix/ngx_files.c --- a/src/os/unix/ngx_files.c Tue Aug 26 16:23:14 2008 +0000 +++ b/src/os/unix/ngx_files.c Tue Aug 26 17:15:11 2008 +0000 @@ -280,7 +280,15 @@ ngx_int_t ngx_read_glob(ngx_glob_t *gl, ngx_str_t *name) { - if (gl->n < (size_t) gl->pglob.gl_matchc) { + size_t count; + +#ifdef GLOB_NOMATCH + count = (size_t) gl->pglob.gl_pathc; +#else + count = (size_t) gl->pglob.gl_matchc; +#endif + + if (gl->n < count) { name->len = (size_t) ngx_strlen(gl->pglob.gl_pathv[gl->n]); name->data = (u_char *) gl->pglob.gl_pathv[gl->n];