recv.2, cmsg.3: Fix type of cmsg_len member of cmsghdr structure

The type shown for cmsg_len member of cmsghdr structure is socklen_t,
but the actual type used by glibc and the kernel is size_t.

The information was obtained from glibc source code:
http://bit.ly/21m1RMp

Signed-off-by: Nikola Forró <nforro@redhat.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Nikola Forró 2016-03-11 11:02:37 +01:00 committed by Michael Kerrisk
parent 1182ddb36a
commit aea45daeee
2 changed files with 6 additions and 6 deletions

View File

@ -393,9 +393,9 @@ The messages are of the form:
.nf
struct cmsghdr {
socklen_t cmsg_len; /* data byte count, including hdr */
int cmsg_level; /* originating protocol */
int cmsg_type; /* protocol-specific type */
size_t cmsg_len; /* data byte count, including hdr */
int cmsg_level; /* originating protocol */
int cmsg_type; /* protocol-specific type */
/* followed by
unsigned char cmsg_data[]; */
};

View File

@ -28,9 +28,9 @@ CMSG_ALIGN, CMSG_SPACE, CMSG_NXTHDR, CMSG_FIRSTHDR \- access ancillary data
.sp
.nf
struct cmsghdr {
socklen_t cmsg_len; /* data byte count, including header */
int cmsg_level; /* originating protocol */
int cmsg_type; /* protocol-specific type */
size_t cmsg_len; /* data byte count, including header */
int cmsg_level; /* originating protocol */
int cmsg_type; /* protocol-specific type */
/* followed by unsigned char cmsg_data[]; */
};
.fi