diff options
author | Igor Sysoev <igor@sysoev.ru> | 2008-08-22 16:54:32 +0400 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2008-08-22 16:54:32 +0400 |
commit | 843ad94e81c7807c6ffcef6198f6a54edb6c66ed (patch) | |
tree | d03b83a03809376654752791f47f80868ed63699 /src/os | |
parent | c5849a6381a918a5606db2bdba8c670e34c46dbb (diff) |
fix building on FreeBSD prior to 4.8, it has no GLOB_NOMATCH
Diffstat (limited to 'src/os')
-rw-r--r-- | src/os/unix/ngx_files.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/os/unix/ngx_files.c b/src/os/unix/ngx_files.c index e2148d843..d3abdd9e2 100644 --- a/src/os/unix/ngx_files.c +++ b/src/os/unix/ngx_files.c @@ -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]; |