comparison src/event/ngx_event_accept.c @ 5360:3d2d3e1cf427

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.
author Maxim Dounin <mdounin@mdounin.ru>
date Wed, 04 Sep 2013 20:48:28 +0400
parents 2fda9065d0f4
children 1ab1cf63f885
comparison
equal deleted inserted replaced
5359:2fda9065d0f4 5360:3d2d3e1cf427
68 } 68 }
69 #else 69 #else
70 s = accept(lc->fd, (struct sockaddr *) sa, &socklen); 70 s = accept(lc->fd, (struct sockaddr *) sa, &socklen);
71 #endif 71 #endif
72 72
73 if (s == -1) { 73 if (s == (ngx_socket_t) -1) {
74 err = ngx_socket_errno; 74 err = ngx_socket_errno;
75 75
76 if (err == NGX_EAGAIN) { 76 if (err == NGX_EAGAIN) {
77 ngx_log_debug0(NGX_LOG_DEBUG_EVENT, ev->log, err, 77 ngx_log_debug0(NGX_LOG_DEBUG_EVENT, ev->log, err,
78 "accept() not ready"); 78 "accept() not ready");