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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
 man2/recv.2 | 6 +++---
 man3/cmsg.3 | 6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/man2/recv.2 b/man2/recv.2
index 33265b8..0491880 100644
--- a/man2/recv.2
+++ b/man2/recv.2
@@ -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[]; */
 };
diff --git a/man3/cmsg.3 b/man3/cmsg.3
index f1c4459..f97333f 100644
--- a/man3/cmsg.3
+++ b/man3/cmsg.3
@@ -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
-- 
2.4.3


--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux