aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2015-01-08 13:12:50 +0000
committerCorinna Vinschen <corinna@vinschen.de>2015-01-08 13:12:50 +0000
commit46eb312f1315ec8798da3a30fcb61f28b2d7fc95 (patch)
treecc59d3981c54109423199a6a7a00724b293d3a55
parent808fde520f93a146ad2c52d681ed8d199133d7f3 (diff)
downloadnewlib-46eb312f1315ec8798da3a30fcb61f28b2d7fc95.zip
newlib-46eb312f1315ec8798da3a30fcb61f28b2d7fc95.tar.gz
newlib-46eb312f1315ec8798da3a30fcb61f28b2d7fc95.tar.bz2
* include/cygwin/socket.h (struct cmsghdr): Redefine cmsg_len as type
size_t. Add comment to explain why.
-rw-r--r--winsup/cygwin/ChangeLog5
-rw-r--r--winsup/cygwin/include/cygwin/socket.h7
2 files changed, 10 insertions, 2 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 1a739d5..364a2ba 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,5 +1,10 @@
2015-01-08 Corinna Vinschen <corinna@vinschen.de>
+ * include/cygwin/socket.h (struct cmsghdr): Redefine cmsg_len as type
+ size_t. Add comment to explain why.
+
+2015-01-08 Corinna Vinschen <corinna@vinschen.de>
+
* localtime.cc (__cygwin_gettzoffset): New function for access from
newlib.
(__cygwin_gettzname): Ditto.
diff --git a/winsup/cygwin/include/cygwin/socket.h b/winsup/cygwin/include/cygwin/socket.h
index 8288c83..b74ada7 100644
--- a/winsup/cygwin/include/cygwin/socket.h
+++ b/winsup/cygwin/include/cygwin/socket.h
@@ -1,7 +1,7 @@
/* cygwin/socket.h
Copyright 1999, 2000, 2001, 2002, 2003, 2005, 2006, 2007, 2009, 2010, 2012,
- 2013, 2014 Red Hat, Inc.
+ 2013, 2014, 2015 Red Hat, Inc.
This file is part of Cygwin.
@@ -77,7 +77,10 @@ struct msghdr
struct cmsghdr
{
- socklen_t cmsg_len; /* Length of cmsghdr + data */
+ /* Amazing but true: The type of cmsg_len should be socklen_t but, just
+ as on Linux, the definition of the kernel is incompatible with this,
+ so the Windows socket headers define cmsg_len as SIZE_T. */
+ size_t cmsg_len; /* Length of cmsghdr + data */
int cmsg_level; /* Protocol */
int cmsg_type; /* Protocol type */
};