diff options
-rw-r--r-- | winsup/cygwin/ChangeLog | 5 | ||||
-rw-r--r-- | winsup/cygwin/include/cygwin/socket.h | 7 |
2 files changed, 10 insertions, 2 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 1a739d5f8..364a2ba31 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 8288c8320..b74ada7eb 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 */ }; |