Mercurial > hg > nginx-vendor-current
diff src/os/unix/ngx_files.c @ 402:df7b79c859c3 NGINX_0_7_13
nginx 0.7.13
*) Bugfix: nginx could not be built on Linux and Solaris; the bug had
appeared in 0.7.12.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Tue, 26 Aug 2008 00:00:00 +0400 |
parents | 6ebbca3d5ed7 |
children | 79c5df00501e |
line wrap: on
line diff
--- a/src/os/unix/ngx_files.c +++ b/src/os/unix/ngx_files.c @@ -280,7 +280,15 @@ ngx_open_glob(ngx_glob_t *gl) 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];