summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/core/nginx.h4
-rw-r--r--src/core/ngx_conf_file.c39
-rw-r--r--src/core/ngx_conf_file.h2
-rw-r--r--src/core/ngx_connection.c4
-rw-r--r--src/core/ngx_connection.h2
-rw-r--r--src/core/ngx_crypt.c1
-rw-r--r--src/core/ngx_slab.c6
-rw-r--r--src/event/modules/ngx_epoll_module.c14
-rw-r--r--src/event/modules/ngx_eventport_module.c31
-rw-r--r--src/event/modules/ngx_rtsig_module.c12
-rw-r--r--src/event/ngx_event.c93
-rw-r--r--src/http/modules/ngx_http_limit_conn_module.c4
-rw-r--r--src/http/modules/ngx_http_log_module.c2
-rw-r--r--src/http/modules/ngx_http_upstream_least_conn_module.c2
-rw-r--r--src/http/modules/perl/nginx.pm2
-rw-r--r--src/http/ngx_http.c5
-rw-r--r--src/http/ngx_http_core_module.c7
-rw-r--r--src/http/ngx_http_core_module.h2
-rw-r--r--src/http/ngx_http_parse_time.c1
-rw-r--r--src/http/ngx_http_request.c2
-rw-r--r--src/http/ngx_http_upstream.c12
-rw-r--r--src/mail/ngx_mail.h4
-rw-r--r--src/mail/ngx_mail_core_module.c6
-rw-r--r--src/mail/ngx_mail_parse.c3
-rw-r--r--src/misc/ngx_cpp_test_module.cpp2
-rw-r--r--src/os/unix/ngx_atomic.h2
-rw-r--r--src/os/unix/ngx_posix_init.c4
-rw-r--r--src/os/unix/ngx_solaris_sendfilev_chain.c3
28 files changed, 190 insertions, 81 deletions
diff --git a/src/core/nginx.h b/src/core/nginx.h
index 52f901d8e..9ab9bc53c 100644
--- a/src/core/nginx.h
+++ b/src/core/nginx.h
@@ -9,8 +9,8 @@
#define _NGINX_H_INCLUDED_
-#define nginx_version 1003003
-#define NGINX_VERSION "1.3.3"
+#define nginx_version 1003004
+#define NGINX_VERSION "1.3.4"
#define NGINX_VER "nginx/" NGINX_VERSION
#define NGINX_VAR "NGINX"
diff --git a/src/core/ngx_conf_file.c b/src/core/ngx_conf_file.c
index 892fa4719..0aa659cd8 100644
--- a/src/core/ngx_conf_file.c
+++ b/src/core/ngx_conf_file.c
@@ -282,24 +282,16 @@ ngx_conf_handler(ngx_conf_t *cf, ngx_int_t last)
{
char *rv;
void *conf, **confp;
- ngx_uint_t i, multi;
+ ngx_uint_t i, found;
ngx_str_t *name;
ngx_command_t *cmd;
name = cf->args->elts;
- multi = 0;
+ found = 0;
for (i = 0; ngx_modules[i]; i++) {
- /* look up the directive in the appropriate modules */
-
- if (ngx_modules[i]->type != NGX_CONF_MODULE
- && ngx_modules[i]->type != cf->module_type)
- {
- continue;
- }
-
cmd = ngx_modules[i]->commands;
if (cmd == NULL) {
continue;
@@ -315,16 +307,18 @@ ngx_conf_handler(ngx_conf_t *cf, ngx_int_t last)
continue;
}
+ found = 1;
+
+ if (ngx_modules[i]->type != NGX_CONF_MODULE
+ && ngx_modules[i]->type != cf->module_type)
+ {
+ continue;
+ }
/* is the directive's location right ? */
if (!(cmd->type & cf->cmd_type)) {
- if (cmd->type & NGX_CONF_MULTI) {
- multi = 1;
- continue;
- }
-
- goto not_allowed;
+ continue;
}
if (!(cmd->type & NGX_CONF_BLOCK) && last != NGX_OK) {
@@ -408,17 +402,16 @@ ngx_conf_handler(ngx_conf_t *cf, ngx_int_t last)
}
}
- if (multi == 0) {
+ if (found) {
ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
- "unknown directive \"%s\"", name->data);
+ "\"%s\" directive is not allowed here", name->data);
return NGX_ERROR;
}
-not_allowed:
-
ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
- "\"%s\" directive is not allowed here", name->data);
+ "unknown directive \"%s\"", name->data);
+
return NGX_ERROR;
invalid:
@@ -1448,12 +1441,16 @@ ngx_conf_set_bitmask_slot(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
}
+#if 0
+
char *
ngx_conf_unsupported(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
{
return "unsupported on this platform";
}
+#endif
+
char *
ngx_conf_deprecated(ngx_conf_t *cf, void *post, void *data)
diff --git a/src/core/ngx_conf_file.h b/src/core/ngx_conf_file.h
index 4b87f1aad..41bacaa98 100644
--- a/src/core/ngx_conf_file.h
+++ b/src/core/ngx_conf_file.h
@@ -45,7 +45,7 @@
#define NGX_CONF_ANY 0x00000400
#define NGX_CONF_1MORE 0x00000800
#define NGX_CONF_2MORE 0x00001000
-#define NGX_CONF_MULTI 0x00002000
+#define NGX_CONF_MULTI 0x00000000 /* compatibility */
#define NGX_DIRECT_CONF 0x00010000
diff --git a/src/core/ngx_connection.c b/src/core/ngx_connection.c
index ba1b3f9e2..660e0af4a 100644
--- a/src/core/ngx_connection.c
+++ b/src/core/ngx_connection.c
@@ -336,10 +336,10 @@ ngx_open_listening_sockets(ngx_cycle_t *cycle)
#if (NGX_HAVE_INET6 && defined IPV6_V6ONLY)
- if (ls[i].sockaddr->sa_family == AF_INET6 && ls[i].ipv6only) {
+ if (ls[i].sockaddr->sa_family == AF_INET6) {
int ipv6only;
- ipv6only = (ls[i].ipv6only == 1);
+ ipv6only = ls[i].ipv6only;
if (setsockopt(s, IPPROTO_IPV6, IPV6_V6ONLY,
(const void *) &ipv6only, sizeof(int))
diff --git a/src/core/ngx_connection.h b/src/core/ngx_connection.h
index 34af12e4f..87fd08723 100644
--- a/src/core/ngx_connection.h
+++ b/src/core/ngx_connection.h
@@ -64,7 +64,7 @@ struct ngx_listening_s {
unsigned addr_ntop:1;
#if (NGX_HAVE_INET6 && defined IPV6_V6ONLY)
- unsigned ipv6only:2;
+ unsigned ipv6only:1;
#endif
unsigned keepalive:2;
diff --git a/src/core/ngx_crypt.c b/src/core/ngx_crypt.c
index 9564c3618..365f9c82a 100644
--- a/src/core/ngx_crypt.c
+++ b/src/core/ngx_crypt.c
@@ -6,6 +6,7 @@
#include <ngx_config.h>
#include <ngx_core.h>
+#include <ngx_crypt.h>
#include <ngx_md5.h>
#if (NGX_HAVE_SHA1)
#include <ngx_sha1.h>
diff --git a/src/core/ngx_slab.c b/src/core/ngx_slab.c
index 3d5660377..782792d79 100644
--- a/src/core/ngx_slab.c
+++ b/src/core/ngx_slab.c
@@ -45,9 +45,7 @@
#define ngx_slab_junk(p, size) ngx_memset(p, 0xA5, size)
-#else
-
-#if (NGX_HAVE_DEBUG_MALLOC)
+#elif (NGX_HAVE_DEBUG_MALLOC)
#define ngx_slab_junk(p, size) \
if (ngx_debug_malloc) ngx_memset(p, 0xA5, size)
@@ -58,8 +56,6 @@
#endif
-#endif
-
static ngx_slab_page_t *ngx_slab_alloc_pages(ngx_slab_pool_t *pool,
ngx_uint_t pages);
static void ngx_slab_free_pages(ngx_slab_pool_t *pool, ngx_slab_page_t *page,
diff --git a/src/event/modules/ngx_epoll_module.c b/src/event/modules/ngx_epoll_module.c
index a73394906..ee77d8e4a 100644
--- a/src/event/modules/ngx_epoll_module.c
+++ b/src/event/modules/ngx_epoll_module.c
@@ -44,16 +44,25 @@ struct epoll_event {
epoll_data_t data;
};
+
+int epoll_create(int size);
+
int epoll_create(int size)
{
return -1;
}
+
+int epoll_ctl(int epfd, int op, int fd, struct epoll_event *event);
+
int epoll_ctl(int epfd, int op, int fd, struct epoll_event *event)
{
return -1;
}
+
+int epoll_wait(int epfd, struct epoll_event *events, int nevents, int timeout);
+
int epoll_wait(int epfd, struct epoll_event *events, int nevents, int timeout)
{
return -1;
@@ -76,11 +85,6 @@ struct io_event {
};
-int eventfd(u_int initval)
-{
- return -1;
-}
-
#endif
#endif
diff --git a/src/event/modules/ngx_eventport_module.c b/src/event/modules/ngx_eventport_module.c
index bbcd6dd6b..d6dcb0bed 100644
--- a/src/event/modules/ngx_eventport_module.c
+++ b/src/event/modules/ngx_eventport_module.c
@@ -15,6 +15,12 @@
#define ushort_t u_short
#define uint_t u_int
+#ifndef CLOCK_REALTIME
+#define CLOCK_REALTIME 0
+typedef int clockid_t;
+typedef void * timer_t;
+#endif
+
/* Solaris declarations */
#define PORT_SOURCE_AIO 1
@@ -24,7 +30,9 @@
#define PORT_SOURCE_ALERT 5
#define PORT_SOURCE_MQ 6
+#ifndef ETIME
#define ETIME 64
+#endif
#define SIGEV_PORT 4
@@ -50,39 +58,62 @@ typedef struct itimerspec { /* definition per POSIX.4 */
#endif
+int port_create(void);
+
int port_create(void)
{
return -1;
}
+
+int port_associate(int port, int source, uintptr_t object, int events,
+ void *user);
+
int port_associate(int port, int source, uintptr_t object, int events,
void *user)
{
return -1;
}
+
+int port_dissociate(int port, int source, uintptr_t object);
+
int port_dissociate(int port, int source, uintptr_t object)
{
return -1;
}
+
+int port_getn(int port, port_event_t list[], uint_t max, uint_t *nget,
+ struct timespec *timeout);
+
int port_getn(int port, port_event_t list[], uint_t max, uint_t *nget,
struct timespec *timeout)
{
return -1;
}
+
+int timer_create(clockid_t clock_id, struct sigevent *evp, timer_t *timerid);
+
int timer_create(clockid_t clock_id, struct sigevent *evp, timer_t *timerid)
{
return -1;
}
+
+int timer_settime(timer_t timerid, int flags, const struct itimerspec *value,
+ struct itimerspec *ovalue);
+
int timer_settime(timer_t timerid, int flags, const struct itimerspec *value,
struct itimerspec *ovalue)
{
return -1;
}
+
+int timer_delete(timer_t timerid);
+
int timer_delete(timer_t timerid)
{
return -1;
diff --git a/src/event/modules/ngx_rtsig_module.c b/src/event/modules/ngx_rtsig_module.c
index 2f0f9970f..b36230c76 100644
--- a/src/event/modules/ngx_rtsig_module.c
+++ b/src/event/modules/ngx_rtsig_module.c
@@ -12,6 +12,13 @@
#if (NGX_TEST_BUILD_RTSIG)
+#if (NGX_DARWIN)
+
+#define SIGRTMIN 33
+#define si_fd __pad[0]
+
+#else
+
#ifdef SIGRTMIN
#define si_fd _reason.__spare__.__spare2__[0]
#else
@@ -19,11 +26,16 @@
#define si_fd __spare__[0]
#endif
+#endif
+
#define F_SETSIG 10
#define KERN_RTSIGNR 30
#define KERN_RTSIGMAX 31
int sigtimedwait(const sigset_t *set, siginfo_t *info,
+ const struct timespec *timeout);
+
+int sigtimedwait(const sigset_t *set, siginfo_t *info,
const struct timespec *timeout)
{
return -1;
diff --git a/src/event/ngx_event.c b/src/event/ngx_event.c
index c584dd87d..600a43394 100644
--- a/src/event/ngx_event.c
+++ b/src/event/ngx_event.c
@@ -567,7 +567,7 @@ ngx_event_module_init(ngx_cycle_t *cycle)
#if !(NGX_WIN32)
-void
+static void
ngx_timer_signal_handler(int signo)
{
ngx_event_timer_alarm = 1;
@@ -1062,50 +1062,91 @@ ngx_event_debug_connection(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
#if (NGX_DEBUG)
ngx_event_conf_t *ecf = conf;
- ngx_int_t rc;
- ngx_str_t *value;
- struct hostent *h;
- ngx_cidr_t *cidr;
+ ngx_int_t rc;
+ ngx_str_t *value;
+ ngx_url_t u;
+ ngx_cidr_t c, *cidr;
+ ngx_uint_t i;
+ struct sockaddr_in *sin;
+#if (NGX_HAVE_INET6)
+ struct sockaddr_in6 *sin6;
+#endif
value = cf->args->elts;
- cidr = ngx_array_push(&ecf->debug_connection);
- if (cidr == NULL) {
- return NGX_CONF_ERROR;
- }
-
#if (NGX_HAVE_UNIX_DOMAIN)
if (ngx_strcmp(value[1].data, "unix:") == 0) {
- cidr->family = AF_UNIX;
- return NGX_CONF_OK;
+ cidr = ngx_array_push(&ecf->debug_connection);
+ if (cidr == NULL) {
+ return NGX_CONF_ERROR;
+ }
+
+ cidr->family = AF_UNIX;
+ return NGX_CONF_OK;
}
#endif
- rc = ngx_ptocidr(&value[1], cidr);
+ rc = ngx_ptocidr(&value[1], &c);
- if (rc == NGX_DONE) {
- ngx_conf_log_error(NGX_LOG_WARN, cf, 0,
- "low address bits of %V are meaningless", &value[1]);
- return NGX_CONF_OK;
- }
+ if (rc != NGX_ERROR) {
+ if (rc == NGX_DONE) {
+ ngx_conf_log_error(NGX_LOG_WARN, cf, 0,
+ "low address bits of %V are meaningless",
+ &value[1]);
+ }
+
+ cidr = ngx_array_push(&ecf->debug_connection);
+ if (cidr == NULL) {
+ return NGX_CONF_ERROR;
+ }
+
+ *cidr = c;
- if (rc == NGX_OK) {
return NGX_CONF_OK;
}
- h = gethostbyname((char *) value[1].data);
+ ngx_memzero(&u, sizeof(ngx_url_t));
+ u.host = value[1];
+
+ if (ngx_inet_resolve_host(cf->pool, &u) != NGX_OK) {
+ if (u.err) {
+ ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
+ "%s in debug_connection \"%V\"",
+ u.err, &u.host);
+ }
- if (h == NULL || h->h_addr_list[0] == NULL) {
- ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
- "host \"%s\" not found", value[1].data);
return NGX_CONF_ERROR;
}
- cidr->family = AF_INET;
- cidr->u.in.mask = 0xffffffff;
- cidr->u.in.addr = *(in_addr_t *)(h->h_addr_list[0]);
+ cidr = ngx_array_push_n(&ecf->debug_connection, u.naddrs);
+ if (cidr == NULL) {
+ return NGX_CONF_ERROR;
+ }
+
+ ngx_memzero(cidr, u.naddrs * sizeof(ngx_cidr_t));
+
+ for (i = 0; i < u.naddrs; i++) {
+ cidr[i].family = u.addrs[i].sockaddr->sa_family;
+
+ switch (cidr[i].family) {
+
+#if (NGX_HAVE_INET6)
+ case AF_INET6:
+ sin6 = (struct sockaddr_in6 *) u.addrs[i].sockaddr;
+ cidr[i].u.in6.addr = sin6->sin6_addr;
+ ngx_memset(cidr[i].u.in6.mask.s6_addr, 0xff, 16);
+ break;
+#endif
+
+ default: /* AF_INET */
+ sin = (struct sockaddr_in *) u.addrs[i].sockaddr;
+ cidr[i].u.in.addr = sin->sin_addr.s_addr;
+ cidr[i].u.in.mask = 0xffffffff;
+ break;
+ }
+ }
#else
diff --git a/src/http/modules/ngx_http_limit_conn_module.c b/src/http/modules/ngx_http_limit_conn_module.c
index c23c046ed..106da7a53 100644
--- a/src/http/modules/ngx_http_limit_conn_module.c
+++ b/src/http/modules/ngx_http_limit_conn_module.c
@@ -238,7 +238,7 @@ ngx_http_limit_conn_handler(ngx_http_request_t *r)
}
ngx_log_debug2(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
- "limit zone: %08XD %d", node->key, lc->conn);
+ "limit conn: %08XD %d", node->key, lc->conn);
ngx_shmtx_unlock(&shpool->mutex);
@@ -358,7 +358,7 @@ ngx_http_limit_conn_cleanup(void *data)
ngx_shmtx_lock(&shpool->mutex);
ngx_log_debug2(NGX_LOG_DEBUG_HTTP, lccln->shm_zone->shm.log, 0,
- "limit zone cleanup: %08XD %d", node->key, lc->conn);
+ "limit conn cleanup: %08XD %d", node->key, lc->conn);
lc->conn--;
diff --git a/src/http/modules/ngx_http_log_module.c b/src/http/modules/ngx_http_log_module.c
index edb145992..5b9c79986 100644
--- a/src/http/modules/ngx_http_log_module.c
+++ b/src/http/modules/ngx_http_log_module.c
@@ -218,7 +218,7 @@ static ngx_http_log_var_t ngx_http_log_vars[] = {
};
-ngx_int_t
+static ngx_int_t
ngx_http_log_handler(ngx_http_request_t *r)
{
u_char *line, *p;
diff --git a/src/http/modules/ngx_http_upstream_least_conn_module.c b/src/http/modules/ngx_http_upstream_least_conn_module.c
index 50e68b21b..21156ae1a 100644
--- a/src/http/modules/ngx_http_upstream_least_conn_module.c
+++ b/src/http/modules/ngx_http_upstream_least_conn_module.c
@@ -81,7 +81,7 @@ ngx_module_t ngx_http_upstream_least_conn_module = {
};
-ngx_int_t
+static ngx_int_t
ngx_http_upstream_init_least_conn(ngx_conf_t *cf,
ngx_http_upstream_srv_conf_t *us)
{
diff --git a/src/http/modules/perl/nginx.pm b/src/http/modules/perl/nginx.pm
index 863027a5d..8a4cafa3a 100644
--- a/src/http/modules/perl/nginx.pm
+++ b/src/http/modules/perl/nginx.pm
@@ -50,7 +50,7 @@ our @EXPORT = qw(
HTTP_INSUFFICIENT_STORAGE
);
-our $VERSION = '1.3.3';
+our $VERSION = '1.3.4';
require XSLoader;
XSLoader::load('nginx', $VERSION);
diff --git a/src/http/ngx_http.c b/src/http/ngx_http.c
index 3e077fb95..f1f8a48e0 100644
--- a/src/http/ngx_http.c
+++ b/src/http/ngx_http.c
@@ -1613,6 +1613,11 @@ ngx_http_cmp_conf_addrs(const void *one, const void *two)
return 1;
}
+ if (second->opt.wildcard) {
+ /* a wildcard address must be the last resort, shift it to the end */
+ return -1;
+ }
+
if (first->opt.bind && !second->opt.bind) {
/* shift explicit bind()ed addresses to the start */
return -1;
diff --git a/src/http/ngx_http_core_module.c b/src/http/ngx_http_core_module.c
index a8177aef7..14dc2cef3 100644
--- a/src/http/ngx_http_core_module.c
+++ b/src/http/ngx_http_core_module.c
@@ -222,7 +222,7 @@ static ngx_command_t ngx_http_core_commands[] = {
NULL },
{ ngx_string("server"),
- NGX_HTTP_MAIN_CONF|NGX_CONF_BLOCK|NGX_CONF_MULTI|NGX_CONF_NOARGS,
+ NGX_HTTP_MAIN_CONF|NGX_CONF_BLOCK|NGX_CONF_NOARGS,
ngx_http_core_server,
0,
0,
@@ -3912,6 +3912,9 @@ ngx_http_core_listen(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
lsopt.setfib = -1;
#endif
lsopt.wildcard = u.wildcard;
+#if (NGX_HAVE_INET6 && defined IPV6_V6ONLY)
+ lsopt.ipv6only = 1;
+#endif
(void) ngx_sock_ntop(&lsopt.u.sockaddr, lsopt.addr,
NGX_SOCKADDR_STRLEN, 1);
@@ -4031,7 +4034,7 @@ ngx_http_core_listen(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
lsopt.ipv6only = 1;
} else if (ngx_strcmp(&value[n].data[10], "ff") == 0) {
- lsopt.ipv6only = 2;
+ lsopt.ipv6only = 0;
} else {
ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
diff --git a/src/http/ngx_http_core_module.h b/src/http/ngx_http_core_module.h
index b11bdcd90..ff1c2dfa0 100644
--- a/src/http/ngx_http_core_module.h
+++ b/src/http/ngx_http_core_module.h
@@ -76,7 +76,7 @@ typedef struct {
unsigned ssl:1;
#endif
#if (NGX_HAVE_INET6 && defined IPV6_V6ONLY)
- unsigned ipv6only:2;
+ unsigned ipv6only:1;
#endif
unsigned so_keepalive:2;
diff --git a/src/http/ngx_http_parse_time.c b/src/http/ngx_http_parse_time.c
index 3801df2fd..985af3172 100644
--- a/src/http/ngx_http_parse_time.c
+++ b/src/http/ngx_http_parse_time.c
@@ -7,6 +7,7 @@
#include <ngx_config.h>
#include <ngx_core.h>
+#include <ngx_http.h>
static ngx_uint_t mday[] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
diff --git a/src/http/ngx_http_request.c b/src/http/ngx_http_request.c
index 60d7b9249..cb970c5c2 100644
--- a/src/http/ngx_http_request.c
+++ b/src/http/ngx_http_request.c
@@ -1831,7 +1831,7 @@ ngx_http_find_virtual_server(ngx_http_request_t *r, u_char *host, size_t len)
#endif
- return NGX_OK;
+ return NGX_DECLINED;
found:
diff --git a/src/http/ngx_http_upstream.c b/src/http/ngx_http_upstream.c
index 3730a2026..6c34f39d6 100644
--- a/src/http/ngx_http_upstream.c
+++ b/src/http/ngx_http_upstream.c
@@ -4422,18 +4422,18 @@ ngx_http_upstream_add(ngx_conf_t *cf, ngx_url_t *u, ngx_uint_t flags)
uscf->servers = ngx_array_create(cf->pool, 1,
sizeof(ngx_http_upstream_server_t));
if (uscf->servers == NULL) {
- return NGX_CONF_ERROR;
+ return NULL;
}
us = ngx_array_push(uscf->servers);
if (us == NULL) {
- return NGX_CONF_ERROR;
+ return NULL;
}
ngx_memzero(us, sizeof(ngx_http_upstream_server_t));
us->addrs = u->addrs;
- us->naddrs = u->naddrs;
+ us->naddrs = 1;
}
uscfp = ngx_array_push(&umcf->upstreams);
@@ -4541,6 +4541,9 @@ ngx_http_upstream_hide_headers_hash(ngx_conf_t *cf,
if (conf->hide_headers == NGX_CONF_UNSET_PTR
&& conf->pass_headers == NGX_CONF_UNSET_PTR)
{
+ conf->hide_headers = prev->hide_headers;
+ conf->pass_headers = prev->pass_headers;
+
conf->hide_headers_hash = prev->hide_headers_hash;
if (conf->hide_headers_hash.buckets
@@ -4552,9 +4555,6 @@ ngx_http_upstream_hide_headers_hash(ngx_conf_t *cf,
return NGX_OK;
}
- conf->hide_headers = prev->hide_headers;
- conf->pass_headers = prev->pass_headers;
-
} else {
if (conf->hide_headers == NGX_CONF_UNSET_PTR) {
conf->hide_headers = prev->hide_headers;
diff --git a/src/mail/ngx_mail.h b/src/mail/ngx_mail.h
index 1fceb4285..ccdfb8c6f 100644
--- a/src/mail/ngx_mail.h
+++ b/src/mail/ngx_mail.h
@@ -39,7 +39,7 @@ typedef struct {
unsigned ssl:1;
#endif
#if (NGX_HAVE_INET6 && defined IPV6_V6ONLY)
- unsigned ipv6only:2;
+ unsigned ipv6only:1;
#endif
unsigned so_keepalive:2;
#if (NGX_HAVE_KEEPALIVE_TUNABLE)
@@ -100,7 +100,7 @@ typedef struct {
unsigned ssl:1;
#endif
#if (NGX_HAVE_INET6 && defined IPV6_V6ONLY)
- unsigned ipv6only:2;
+ unsigned ipv6only:1;
#endif
unsigned so_keepalive:2;
#if (NGX_HAVE_KEEPALIVE_TUNABLE)
diff --git a/src/mail/ngx_mail_core_module.c b/src/mail/ngx_mail_core_module.c
index f79913b0a..f0dee7283 100644
--- a/src/mail/ngx_mail_core_module.c
+++ b/src/mail/ngx_mail_core_module.c
@@ -374,6 +374,10 @@ ngx_mail_core_listen(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
ls->wildcard = u.wildcard;
ls->ctx = cf->ctx;
+#if (NGX_HAVE_INET6 && defined IPV6_V6ONLY)
+ ls->ipv6only = 1;
+#endif
+
for (m = 0; ngx_modules[m]; m++) {
if (ngx_modules[m]->type != NGX_MAIL_MODULE) {
continue;
@@ -413,7 +417,7 @@ ngx_mail_core_listen(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
ls->ipv6only = 1;
} else if (ngx_strcmp(&value[i].data[10], "ff") == 0) {
- ls->ipv6only = 2;
+ ls->ipv6only = 0;
} else {
ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
diff --git a/src/mail/ngx_mail_parse.c b/src/mail/ngx_mail_parse.c
index ae0f7e39a..eb16d5b4f 100644
--- a/src/mail/ngx_mail_parse.c
+++ b/src/mail/ngx_mail_parse.c
@@ -9,6 +9,9 @@
#include <ngx_core.h>
#include <ngx_event.h>
#include <ngx_mail.h>
+#include <ngx_mail_pop3_module.h>
+#include <ngx_mail_imap_module.h>
+#include <ngx_mail_smtp_module.h>
ngx_int_t
diff --git a/src/misc/ngx_cpp_test_module.cpp b/src/misc/ngx_cpp_test_module.cpp
index 8f87dcdad..3cbc0a811 100644
--- a/src/misc/ngx_cpp_test_module.cpp
+++ b/src/misc/ngx_cpp_test_module.cpp
@@ -20,6 +20,8 @@ extern "C" {
// #include <string>
+void ngx_cpp_test_handler(void *data);
+
void
ngx_cpp_test_handler(void *data)
{
diff --git a/src/os/unix/ngx_atomic.h b/src/os/unix/ngx_atomic.h
index 104ac376a..417cd86ff 100644
--- a/src/os/unix/ngx_atomic.h
+++ b/src/os/unix/ngx_atomic.h
@@ -48,7 +48,9 @@ typedef volatile ngx_atomic_uint_t ngx_atomic_t;
#include <libkern/OSAtomic.h>
/* "bool" conflicts with perl's CORE/handy.h */
+#if 0
#undef bool
+#endif
#define NGX_HAVE_ATOMIC_OPS 1
diff --git a/src/os/unix/ngx_posix_init.c b/src/os/unix/ngx_posix_init.c
index eea65a903..58e6f7614 100644
--- a/src/os/unix/ngx_posix_init.c
+++ b/src/os/unix/ngx_posix_init.c
@@ -98,6 +98,8 @@ ngx_os_status(ngx_log_t *log)
}
+#if 0
+
ngx_int_t
ngx_posix_post_conf_init(ngx_log_t *log)
{
@@ -122,3 +124,5 @@ ngx_posix_post_conf_init(ngx_log_t *log)
return NGX_OK;
}
+
+#endif
diff --git a/src/os/unix/ngx_solaris_sendfilev_chain.c b/src/os/unix/ngx_solaris_sendfilev_chain.c
index f800c15f5..520eaaab4 100644
--- a/src/os/unix/ngx_solaris_sendfilev_chain.c
+++ b/src/os/unix/ngx_solaris_sendfilev_chain.c
@@ -29,6 +29,9 @@ static ssize_t sendfilev(int fd, const struct sendfilevec *vec,
return -1;
}
+ngx_chain_t *ngx_solaris_sendfilev_chain(ngx_connection_t *c, ngx_chain_t *in,
+ off_t limit);
+
#endif