Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nginx/nginx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2008-08-26 21:15:11 +0400
committerIgor Sysoev <igor@sysoev.ru>2008-08-26 21:15:11 +0400
commit316eafb88d67c2fa7173b5d3986446a403184eb3 (patch)
treeebf84565a35d3cb0513e28ec31a63e3d2d73fcd1
parente56cc8e5030bb74639c2b53a9c6c765dea6859f4 (diff)
fix build on Linux and Solaris introduced in r2200
-rw-r--r--src/os/unix/ngx_files.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/os/unix/ngx_files.c b/src/os/unix/ngx_files.c
index d3abdd9e2..8d2733821 100644
--- 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];