mirror of
https://github.com/nginx/nginx.git
synced 2025-06-07 17:52:38 +08:00
fix building on Linux and Solaris
This commit is contained in:
parent
0e4a95dfe3
commit
cc05432bf4
@ -256,7 +256,7 @@ ngx_open_dir(ngx_str_t *name, ngx_dir_t *dir)
|
|||||||
ngx_int_t
|
ngx_int_t
|
||||||
ngx_open_glob(ngx_glob_t *gl)
|
ngx_open_glob(ngx_glob_t *gl)
|
||||||
{
|
{
|
||||||
if (glob((char *) gl->pattern, 0, NULL, &gl->pglob) == 0) {
|
if (glob((char *) gl->pattern, GLOB_NOSORT, NULL, &gl->pglob) == 0) {
|
||||||
return NGX_OK;
|
return NGX_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -267,7 +267,7 @@ ngx_open_glob(ngx_glob_t *gl)
|
|||||||
ngx_int_t
|
ngx_int_t
|
||||||
ngx_read_glob(ngx_glob_t *gl, ngx_str_t *name)
|
ngx_read_glob(ngx_glob_t *gl, ngx_str_t *name)
|
||||||
{
|
{
|
||||||
if (gl->n < gl->pglob.gl_pathc) {
|
if (gl->n < (size_t) gl->pglob.gl_pathc) {
|
||||||
|
|
||||||
name->len = (size_t) ngx_strlen(gl->pglob.gl_pathv[gl->n]);
|
name->len = (size_t) ngx_strlen(gl->pglob.gl_pathv[gl->n]);
|
||||||
name->data = (u_char *) gl->pglob.gl_pathv[gl->n];
|
name->data = (u_char *) gl->pglob.gl_pathv[gl->n];
|
||||||
|
@ -131,7 +131,7 @@ ngx_int_t ngx_open_dir(ngx_str_t *name, ngx_dir_t *dir);
|
|||||||
|
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
int n;
|
size_t n;
|
||||||
glob_t pglob;
|
glob_t pglob;
|
||||||
u_char *pattern;
|
u_char *pattern;
|
||||||
ngx_log_t *log;
|
ngx_log_t *log;
|
||||||
|
Loading…
Reference in New Issue
Block a user