]> git.kaiwu.me - nginx.git/commitdiff
fix build on Linux and Solaris introduced in r2200
authorIgor Sysoev <igor@sysoev.ru>
Tue, 26 Aug 2008 17:15:11 +0000 (17:15 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Tue, 26 Aug 2008 17:15:11 +0000 (17:15 +0000)
src/os/unix/ngx_files.c

index d3abdd9e2cafa0258d0f35b84a6a2bdda1c7a6ca..8d2733821ec1dbd1ddb08d82d50e99059b1209b7 100644 (file)
@@ -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];