summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/http/ngx_http.c8
-rw-r--r--src/os/win32/ngx_win32_config.h7
2 files changed, 10 insertions, 5 deletions
diff --git a/src/http/ngx_http.c b/src/http/ngx_http.c
index 4f0b79def..1eb22f81e 100644
--- a/src/http/ngx_http.c
+++ b/src/http/ngx_http.c
@@ -1747,10 +1747,12 @@ ngx_http_add_listening(ngx_conf_t *cf, ngx_http_conf_addr_t *addr)
#if (NGX_WIN32)
{
- ngx_iocp_conf_t *iocpcf;
+ ngx_iocp_conf_t *iocpcf = NULL;
- iocpcf = ngx_event_get_conf(cf->cycle->conf_ctx, ngx_iocp_module);
- if (iocpcf->acceptex_read) {
+ if (ngx_get_conf(cf->cycle->conf_ctx, ngx_events_module)) {
+ iocpcf = ngx_event_get_conf(cf->cycle->conf_ctx, ngx_iocp_module);
+ }
+ if (iocpcf && iocpcf->acceptex_read) {
ls->post_accept_buffer_size = cscf->client_header_buffer_size;
}
}
diff --git a/src/os/win32/ngx_win32_config.h b/src/os/win32/ngx_win32_config.h
index f098eae36..8ffe95c31 100644
--- a/src/os/win32/ngx_win32_config.h
+++ b/src/os/win32/ngx_win32_config.h
@@ -9,7 +9,7 @@
#define WIN32 0x0400
-#define _WIN32_WINNT 0x0500
+#define _WIN32_WINNT 0x0501
#define STRICT
@@ -126,8 +126,11 @@ typedef unsigned __int64 uint64_t;
typedef int intptr_t;
typedef u_int uintptr_t;
-typedef int ssize_t;
+/* Windows defines off_t as long, which is 32-bit */
typedef __int64 off_t;
+#define _OFF_T_DEFINED
+
+typedef int ssize_t;
typedef uint32_t in_addr_t;
typedef u_short in_port_t;
typedef int sig_atomic_t;