summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorMax Romanov <max.romanov@nginx.com>2017-10-19 18:20:08 +0300
committerMax Romanov <max.romanov@nginx.com>2017-10-19 18:20:08 +0300
commitc8a8a7c2120e276777f97dcee6d489788417792a (patch)
treeee4c2a16567beecd382a0c61672b8812b10f764f
parentf9f852008fcbe94c099d9d42cef010d74fea2574 (diff)
downloadunit-c8a8a7c2120e276777f97dcee6d489788417792a.tar.gz
unit-c8a8a7c2120e276777f97dcee6d489788417792a.tar.bz2
Fixing Go package build.
Go package build was broken by change 365:28b2a468be43.
-rw-r--r--src/go/unit/nxt_go_port_memory.c6
-rw-r--r--src/go/unit/nxt_go_port_memory.h6
-rw-r--r--src/go/unit/nxt_go_process.c13
-rw-r--r--src/go/unit/nxt_go_process.h4
-rw-r--r--src/go/unit/nxt_go_run_ctx.c6
5 files changed, 21 insertions, 14 deletions
diff --git a/src/go/unit/nxt_go_port_memory.c b/src/go/unit/nxt_go_port_memory.c
index 310e17cb..2e970347 100644
--- a/src/go/unit/nxt_go_port_memory.c
+++ b/src/go/unit/nxt_go_port_memory.c
@@ -32,7 +32,7 @@ nxt_go_new_port_mmap(nxt_go_process_t *process, nxt_port_id_t id)
char name[64];
nxt_fd_t fd;
nxt_port_msg_t port_msg;
- nxt_port_mmap_t *port_mmap;
+ nxt_go_port_mmap_t *port_mmap;
nxt_port_mmap_header_t *hdr;
fd = -1;
@@ -162,8 +162,8 @@ nxt_port_mmap_header_t *
nxt_go_port_mmap_get(nxt_go_process_t *process, nxt_port_id_t port_id,
nxt_chunk_id_t *c)
{
- nxt_port_mmap_t *port_mmap;
- nxt_port_mmap_t *end_port_mmap;
+ nxt_go_port_mmap_t *port_mmap;
+ nxt_go_port_mmap_t *end_port_mmap;
nxt_port_mmap_header_t *hdr;
port_mmap = NULL;
diff --git a/src/go/unit/nxt_go_port_memory.h b/src/go/unit/nxt_go_port_memory.h
index f6fe94e3..d7e321c0 100644
--- a/src/go/unit/nxt_go_port_memory.h
+++ b/src/go/unit/nxt_go_port_memory.h
@@ -16,6 +16,12 @@
typedef struct nxt_go_process_s nxt_go_process_t;
#endif
+typedef struct nxt_go_port_mmap_s nxt_go_port_mmap_t;
+
+struct nxt_go_port_mmap_s {
+ nxt_port_mmap_header_t *hdr;
+};
+
struct nxt_port_mmap_header_s *
nxt_go_port_mmap_get(nxt_go_process_t *process, nxt_port_id_t port_id,
nxt_chunk_id_t *c);
diff --git a/src/go/unit/nxt_go_process.c b/src/go/unit/nxt_go_process.c
index 736177ea..eb29cee1 100644
--- a/src/go/unit/nxt_go_process.c
+++ b/src/go/unit/nxt_go_process.c
@@ -11,6 +11,7 @@
#include "nxt_go_array.h"
#include "nxt_go_mutex.h"
#include "nxt_go_log.h"
+#include "nxt_go_port_memory.h"
#include <nxt_port_memory_int.h>
@@ -89,9 +90,9 @@ nxt_go_get_process(nxt_pid_t pid)
process->pid = pid;
nxt_go_mutex_create(&process->incoming_mutex);
- nxt_go_array_init(&process->incoming, 1, sizeof(nxt_port_mmap_t));
+ nxt_go_array_init(&process->incoming, 1, sizeof(nxt_go_port_mmap_t));
nxt_go_mutex_create(&process->outgoing_mutex);
- nxt_go_array_init(&process->outgoing, 1, sizeof(nxt_port_mmap_t));
+ nxt_go_array_init(&process->outgoing, 1, sizeof(nxt_go_port_mmap_t));
}
return process;
@@ -101,10 +102,10 @@ nxt_go_get_process(nxt_pid_t pid)
void
nxt_go_new_incoming_mmap(nxt_pid_t pid, nxt_fd_t fd)
{
- void *mem;
- struct stat mmap_stat;
- nxt_port_mmap_t *port_mmap;
- nxt_go_process_t *process;
+ void *mem;
+ struct stat mmap_stat;
+ nxt_go_process_t *process;
+ nxt_go_port_mmap_t *port_mmap;
process = nxt_go_get_process(pid);
diff --git a/src/go/unit/nxt_go_process.h b/src/go/unit/nxt_go_process.h
index 037844ce..197de1e9 100644
--- a/src/go/unit/nxt_go_process.h
+++ b/src/go/unit/nxt_go_process.h
@@ -19,9 +19,9 @@ typedef struct nxt_go_process_s nxt_go_process_t;
struct nxt_go_process_s {
nxt_pid_t pid;
nxt_go_mutex_t incoming_mutex;
- nxt_array_t incoming; /* of nxt_port_mmap_t */
+ nxt_array_t incoming; /* of nxt_go_port_mmap_t */
nxt_go_mutex_t outgoing_mutex;
- nxt_array_t outgoing; /* of nxt_port_mmap_t */
+ nxt_array_t outgoing; /* of nxt_go_port_mmap_t */
};
nxt_go_process_t *nxt_go_get_process(nxt_pid_t pid);
diff --git a/src/go/unit/nxt_go_run_ctx.c b/src/go/unit/nxt_go_run_ctx.c
index 0dd72f8b..68df8f49 100644
--- a/src/go/unit/nxt_go_run_ctx.c
+++ b/src/go/unit/nxt_go_run_ctx.c
@@ -24,7 +24,7 @@ nxt_go_ctx_msg_rbuf(nxt_go_run_ctx_t *ctx, nxt_go_msg_t *msg, nxt_buf_t *buf,
uint32_t n)
{
size_t nchunks;
- nxt_port_mmap_t *port_mmap;
+ nxt_go_port_mmap_t *port_mmap;
nxt_port_mmap_msg_t *mmap_msg;
if (nxt_slow_path(msg->mmap_msg == NULL)) {
@@ -116,7 +116,7 @@ nxt_go_ctx_release_msg(nxt_go_run_ctx_t *ctx, nxt_go_msg_t *msg)
{
u_char *b, *e;
nxt_chunk_id_t c;
- nxt_port_mmap_t *port_mmap;
+ nxt_go_port_mmap_t *port_mmap;
nxt_port_mmap_msg_t *mmap_msg, *end;
if (nxt_slow_path(msg->mmap_msg == NULL)) {
@@ -235,7 +235,7 @@ nxt_go_port_mmap_get_buf(nxt_go_run_ctx_t *ctx, size_t size)
size_t nchunks;
nxt_buf_t *buf;
nxt_chunk_id_t c;
- nxt_port_mmap_t *port_mmap;
+ nxt_go_port_mmap_t *port_mmap;
nxt_port_mmap_msg_t *mmap_msg;
nxt_port_mmap_header_t *hdr;