From 48d96ced6ff6cea533d56d0d09129f6632a19e4d Mon Sep 17 00:00:00 2001 From: Maxim Dounin Date: Wed, 4 Sep 2013 20:48:28 +0400 Subject: 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. --- src/os/win32/ngx_win32_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/os/win32/ngx_win32_init.c') diff --git a/src/os/win32/ngx_win32_init.c b/src/os/win32/ngx_win32_init.c index cf73d8215..d2505ced4 100644 --- a/src/os/win32/ngx_win32_init.c +++ b/src/os/win32/ngx_win32_init.c @@ -141,7 +141,7 @@ ngx_os_init(ngx_log_t *log) */ s = ngx_socket(AF_INET, SOCK_STREAM, IPPROTO_IP); - if (s == -1) { + if (s == (ngx_socket_t) -1) { ngx_log_error(NGX_LOG_EMERG, log, ngx_socket_errno, ngx_socket_n " falied"); return NGX_ERROR; -- cgit