diff options
author | Maxim Dounin <mdounin@mdounin.ru> | 2013-09-04 20:48:28 +0400 |
---|---|---|
committer | Maxim Dounin <mdounin@mdounin.ru> | 2013-09-04 20:48:28 +0400 |
commit | 48d96ced6ff6cea533d56d0d09129f6632a19e4d (patch) | |
tree | f3196223e3dd9173aaf91dff959498799c0e3ea2 /src/core/ngx_cycle.c | |
parent | 74b7a910137a99b5fb073e7c27858c019f96a8cc (diff) |
Win32: MinGW GCC compatibility.
Several warnings silenced, notably (ngx_socket_t) -1 is now checked
on socket operations instead of -1, as ngx_socket_t is unsigned on win32
and gcc complains on comparison.
With this patch, it's now possible to compile nginx using mingw gcc,
with options we normally compile on win32.
Diffstat (limited to 'src/core/ngx_cycle.c')
-rw-r--r-- | src/core/ngx_cycle.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core/ngx_cycle.c b/src/core/ngx_cycle.c index 2c006bcb2..eb39ab253 100644 --- a/src/core/ngx_cycle.c +++ b/src/core/ngx_cycle.c @@ -543,7 +543,7 @@ ngx_init_cycle(ngx_cycle_t *old_cycle) } } - if (nls[n].fd == -1) { + if (nls[n].fd == (ngx_socket_t) -1) { nls[n].open = 1; } } @@ -649,7 +649,7 @@ old_shm_zone_done: ls = old_cycle->listening.elts; for (i = 0; i < old_cycle->listening.nelts; i++) { - if (ls[i].remain || ls[i].fd == -1) { + if (ls[i].remain || ls[i].fd == (ngx_socket_t) -1) { continue; } @@ -813,7 +813,7 @@ failed: ls = cycle->listening.elts; for (i = 0; i < cycle->listening.nelts; i++) { - if (ls[i].fd == -1 || !ls[i].open) { + if (ls[i].fd == (ngx_socket_t) -1 || !ls[i].open) { continue; } |