]> git.kaiwu.me - nginx.git/commitdiff
fix building on FreeBSD prior to 4.8, it has no GLOB_NOMATCH
authorIgor Sysoev <igor@sysoev.ru>
Fri, 22 Aug 2008 12:54:32 +0000 (12:54 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Fri, 22 Aug 2008 12:54:32 +0000 (12:54 +0000)
src/os/unix/ngx_files.c

index e2148d843a2d628888e67b19a11517be5128bcf2..d3abdd9e2cafa0258d0f35b84a6a2bdda1c7a6ca 100644 (file)
@@ -265,10 +265,14 @@ ngx_open_glob(ngx_glob_t *gl)
         return NGX_OK;
     }
 
+#ifdef GLOB_NOMATCH
+
     if (n == GLOB_NOMATCH && gl->test) {
         return NGX_OK;
     }
 
+#endif
+
     return NGX_ERROR;
 }
 
@@ -276,7 +280,7 @@ 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_pathc) {
+    if (gl->n < (size_t) gl->pglob.gl_matchc) {
 
         name->len = (size_t) ngx_strlen(gl->pglob.gl_pathv[gl->n]);
         name->data = (u_char *) gl->pglob.gl_pathv[gl->n];