summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorMax Romanov <max.romanov@nginx.com>2017-07-25 16:18:31 +0300
committerMax Romanov <max.romanov@nginx.com>2017-07-25 16:18:31 +0300
commit316c77a9de638c54e2574c205276917ff442d06e (patch)
tree7adb1b8cd00a8f54298840531e83f8242907aa60 /src
parent578cd547c0f121267f8f66a0523fab67c433a90b (diff)
downloadunit-316c77a9de638c54e2574c205276917ff442d06e.tar.gz
unit-316c77a9de638c54e2574c205276917ff442d06e.tar.bz2
Fixed building on Solaris by Sun C.
Diffstat (limited to 'src')
-rw-r--r--src/nxt_application.h2
-rw-r--r--src/nxt_conf.c4
-rw-r--r--src/nxt_conf_validation.c8
-rw-r--r--src/nxt_conn.h1
-rw-r--r--src/nxt_router.c5
5 files changed, 9 insertions, 11 deletions
diff --git a/src/nxt_application.h b/src/nxt_application.h
index 97250324..f27f90cd 100644
--- a/src/nxt_application.h
+++ b/src/nxt_application.h
@@ -101,7 +101,7 @@ typedef struct {
} nxt_app_request_t;
-//typedef struct nxt_app_parse_ctx_s nxt_app_parse_ctx_t;
+typedef struct nxt_app_parse_ctx_s nxt_app_parse_ctx_t;
struct nxt_app_parse_ctx_s {
nxt_app_request_t r;
diff --git a/src/nxt_conf.c b/src/nxt_conf.c
index 43170d20..caa2a154 100644
--- a/src/nxt_conf.c
+++ b/src/nxt_conf.c
@@ -41,7 +41,7 @@ typedef struct nxt_conf_array_s nxt_conf_array_t;
typedef struct nxt_conf_object_s nxt_conf_object_t;
-struct nxt_aligned(8) nxt_conf_value_s {
+struct nxt_conf_value_s {
union nxt_packed {
uint8_t boolean; /* 1 bit. */
int64_t integer;
@@ -62,7 +62,7 @@ struct nxt_aligned(8) nxt_conf_value_s {
} u;
uint8_t type; /* 3 bits. */
-};
+} nxt_aligned(8);
struct nxt_conf_array_s {
diff --git a/src/nxt_conf_validation.c b/src/nxt_conf_validation.c
index 45784e8e..0608eaa9 100644
--- a/src/nxt_conf_validation.c
+++ b/src/nxt_conf_validation.c
@@ -37,12 +37,12 @@ static nxt_conf_vldt_object_t nxt_conf_vldt_root_members[] = {
{ nxt_string("listeners"),
NXT_CONF_OBJECT,
&nxt_conf_vldt_object_iterator,
- &nxt_conf_vldt_listener },
+ (void *) &nxt_conf_vldt_listener },
{ nxt_string("applications"),
NXT_CONF_OBJECT,
&nxt_conf_vldt_object_iterator,
- &nxt_conf_vldt_app },
+ (void *) &nxt_conf_vldt_app },
{ nxt_null_string, 0, NULL, NULL }
};
@@ -301,7 +301,7 @@ nxt_conf_vldt_object_iterator(nxt_conf_value_t *conf, nxt_conf_value_t *value,
nxt_conf_value_t *member;
nxt_conf_vldt_member_t validator;
- validator = data;
+ validator = (nxt_conf_vldt_member_t) data;
index = 0;
for ( ;; ) {
@@ -315,6 +315,4 @@ nxt_conf_vldt_object_iterator(nxt_conf_value_t *conf, nxt_conf_value_t *value,
return NXT_ERROR;
}
}
-
- return NXT_OK;
}
diff --git a/src/nxt_conn.h b/src/nxt_conn.h
index f08eafdd..0062158e 100644
--- a/src/nxt_conn.h
+++ b/src/nxt_conn.h
@@ -183,7 +183,6 @@ struct nxt_conn_s {
typedef uint32_t nxt_req_id_t;
-typedef struct nxt_app_parse_ctx_s nxt_app_parse_ctx_t;
typedef struct {
nxt_req_id_t req_id;
diff --git a/src/nxt_router.c b/src/nxt_router.c
index 40cf0131..0cee933f 100644
--- a/src/nxt_router.c
+++ b/src/nxt_router.c
@@ -382,12 +382,13 @@ nxt_router_conf_data_handler(nxt_task_t *task, nxt_port_recv_msg_t *msg)
b->mem.pos = b->mem.free;
if (ret == NXT_OK) {
- return nxt_router_conf_success(task, tmcf);
+ nxt_router_conf_success(task, tmcf);
+ return;
}
nxt_log(task, NXT_LOG_CRIT, "failed to apply new conf");
- return nxt_router_conf_error(task, tmcf);
+ nxt_router_conf_error(task, tmcf);
}