summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_port.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/nxt_port.h2
1 files changed, 1 insertions, 1 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 {