]> git.kaiwu.me - nginx.git/commitdiff
fix building on Linux and Solaris
authorIgor Sysoev <igor@sysoev.ru>
Mon, 2 Oct 2006 14:50:19 +0000 (14:50 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Mon, 2 Oct 2006 14:50:19 +0000 (14:50 +0000)
src/os/unix/ngx_files.c
src/os/unix/ngx_files.h

index 12e595ee8dd9981a1a8f34de207a57fe526d74c4..50db532b6987f4faa54ec4ce822d1d1575b9c8ab 100644 (file)
@@ -256,7 +256,7 @@ ngx_open_dir(ngx_str_t *name, ngx_dir_t *dir)
 ngx_int_t
 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;
     }
 
@@ -267,7 +267,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 < 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->data = (u_char *) gl->pglob.gl_pathv[gl->n];
index 3e1e2251950af57f426c1a69000092bc93bfa558..72d3461a8ded3ea46f05cf438477799ce119a410 100644 (file)
@@ -131,7 +131,7 @@ ngx_int_t ngx_open_dir(ngx_str_t *name, ngx_dir_t *dir);
 
 
 typedef struct {
-    int         n;
+    size_t      n;
     glob_t      pglob;
     u_char     *pattern;
     ngx_log_t  *log;