From d3f19d98cae610a9ddec9af5421f8af7c6663d9c Mon Sep 17 00:00:00 2001 From: Max Romanov Date: Wed, 30 Aug 2017 12:08:29 -0700 Subject: [PATCH] Avoid nxt_go_process_t redefinition warning. --- src/nginext/nxt_go_port_memory.h | 6 +++++- src/nginext/nxt_go_process.h | 3 +++ src/nginext/nxt_go_run_ctx.h | 6 ++++-- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/nginext/nxt_go_port_memory.h b/src/nginext/nxt_go_port_memory.h index 0a1644ef..ca0cc967 100644 --- a/src/nginext/nxt_go_port_memory.h +++ b/src/nginext/nxt_go_port_memory.h @@ -12,7 +12,11 @@ #include typedef struct nxt_port_mmap_header_s nxt_port_mmap_header_t; -typedef struct nxt_go_process_s nxt_go_process_t; + +#ifndef _NXT_GO_PROCESS_T_DEFINED_ +#define _NXT_GO_PROCESS_T_DEFINED_ +typedef struct nxt_go_process_s nxt_go_process_t; +#endif nxt_port_mmap_header_t * nxt_go_port_mmap_get(nxt_go_process_t *process, nxt_port_id_t port_id, diff --git a/src/nginext/nxt_go_process.h b/src/nginext/nxt_go_process.h index 5e31fa6e..037844ce 100644 --- a/src/nginext/nxt_go_process.h +++ b/src/nginext/nxt_go_process.h @@ -11,7 +11,10 @@ #include #include "nxt_go_mutex.h" +#ifndef _NXT_GO_PROCESS_T_DEFINED_ +#define _NXT_GO_PROCESS_T_DEFINED_ typedef struct nxt_go_process_s nxt_go_process_t; +#endif struct nxt_go_process_s { nxt_pid_t pid; diff --git a/src/nginext/nxt_go_run_ctx.h b/src/nginext/nxt_go_run_ctx.h index 62f6b133..a5a972c6 100644 --- a/src/nginext/nxt_go_run_ctx.h +++ b/src/nginext/nxt_go_run_ctx.h @@ -12,8 +12,10 @@ #include #include - -typedef struct nxt_go_process_s nxt_go_process_t; +#ifndef _NXT_GO_PROCESS_T_DEFINED_ +#define _NXT_GO_PROCESS_T_DEFINED_ +typedef struct nxt_go_process_s nxt_go_process_t; +#endif typedef struct nxt_go_msg_s nxt_go_msg_t;