From ec411569e77fc28a9f6641e567c7689fba9bc942 Mon Sep 17 00:00:00 2001 From: Max Romanov Date: Thu, 2 Nov 2017 15:32:46 +0300 Subject: [PATCH] Fixing build on Solaris. --- src/nxt_port.h | 2 +- src/nxt_port_socket.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/nxt_port.h b/src/nxt_port.h index 0d913df5..2c9a1a99 100644 --- a/src/nxt_port.h +++ b/src/nxt_port.h @@ -39,7 +39,7 @@ struct nxt_port_handlers_s { #define nxt_port_handler_idx(name) \ - ( &((nxt_port_handlers_t *) 0)->name - (nxt_port_handler_t *) 0) + ( offsetof(nxt_port_handlers_t, name) / sizeof(nxt_port_handler_t) ) typedef enum { diff --git a/src/nxt_port_socket.c b/src/nxt_port_socket.c index a430eacf..08f87e84 100644 --- a/src/nxt_port_socket.c +++ b/src/nxt_port_socket.c @@ -572,7 +572,7 @@ nxt_port_lvlhsh_frag_alloc(void *ctx, size_t size) static void nxt_port_lvlhsh_frag_free(void *ctx, void *p) { - return nxt_mp_free(ctx, p); + nxt_mp_free(ctx, p); }