Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nginx/nginx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxim Dounin <mdounin@mdounin.ru>2013-09-04 20:48:28 +0400
committerMaxim Dounin <mdounin@mdounin.ru>2013-09-04 20:48:28 +0400
commit48d96ced6ff6cea533d56d0d09129f6632a19e4d (patch)
treef3196223e3dd9173aaf91dff959498799c0e3ea2 /src/core/ngx_connection.c
parent74b7a910137a99b5fb073e7c27858c019f96a8cc (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_connection.c')
-rw-r--r--src/core/ngx_connection.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core/ngx_connection.c b/src/core/ngx_connection.c
index e12d3efc0..28bf6ba06 100644
--- a/src/core/ngx_connection.c
+++ b/src/core/ngx_connection.c
@@ -297,7 +297,7 @@ ngx_open_listening_sockets(ngx_cycle_t *cycle)
continue;
}
- if (ls[i].fd != -1) {
+ if (ls[i].fd != (ngx_socket_t) -1) {
continue;
}
@@ -312,7 +312,7 @@ ngx_open_listening_sockets(ngx_cycle_t *cycle)
s = ngx_socket(ls[i].sockaddr->sa_family, ls[i].type, 0);
- if (s == -1) {
+ if (s == (ngx_socket_t) -1) {
ngx_log_error(NGX_LOG_EMERG, log, ngx_socket_errno,
ngx_socket_n " %V failed", &ls[i].addr_text);
return NGX_ERROR;
@@ -863,7 +863,7 @@ ngx_close_connection(ngx_connection_t *c)
ngx_uint_t log_error, level;
ngx_socket_t fd;
- if (c->fd == -1) {
+ if (c->fd == (ngx_socket_t) -1) {
ngx_log_error(NGX_LOG_ALERT, c->log, 0, "connection already closed");
return;
}