aboutsummaryrefslogtreecommitdiff
path: root/src/os/unix/ngx_process_cycle.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/os/unix/ngx_process_cycle.c')
-rw-r--r--src/os/unix/ngx_process_cycle.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/os/unix/ngx_process_cycle.c b/src/os/unix/ngx_process_cycle.c
index 818676ae9..fec4210d7 100644
--- a/src/os/unix/ngx_process_cycle.c
+++ b/src/os/unix/ngx_process_cycle.c
@@ -786,7 +786,7 @@ ngx_int_t ngx_write_channel(ngx_socket_t s, ngx_channel_t *ch, size_t size,
cmsg.cm.cmsg_len = sizeof(cmsg);
cmsg.cm.cmsg_level = SOL_SOCKET;
cmsg.cm.cmsg_type = SCM_RIGHTS;
- *(int *) CMSG_DATA(&cmsg) = ch->fd;
+ *(int *) CMSG_DATA(&cmsg.cm) = ch->fd;
}
#else
@@ -896,7 +896,7 @@ ngx_int_t ngx_read_channel(ngx_socket_t s, ngx_channel_t *ch, size_t size,
return NGX_ERROR;
}
- ch->fd = *(int *) CMSG_DATA(&cmsg);
+ ch->fd = *(int *) CMSG_DATA(&cmsg.cm);
}
if (msg.msg_flags & (MSG_TRUNC|MSG_CTRUNC)) {