• R/O
  • HTTP
  • SSH
  • HTTPS

mingw-org-wsl: Commit

The MinGW.org Windows System Libraries


Commit MetaInfo

Revision2821f57617d6ce94e7cfb218a9fc88559bd6260f (tree)
Time2020-07-06 06:32:09
AuthorKeith Marshall <keith@user...>
CommiterKeith Marshall

Log Message

Revert typedef of socklen_t to signed int type.

Change Summary

Incremental Difference

--- a/w32api/ChangeLog
+++ b/w32api/ChangeLog
@@ -1,3 +1,13 @@
1+2020-07-05 Keith Marshall <keith@users.osdn.me>
2+
3+ Revert typedef of socklen_t to signed int type.
4+
5+ * include/ws2tcpip.h (socklen_t): Change from unsigned int to int.
6+
7+ * include/wspiapi.h (__wspiapi_getnameinfo): In comparison...
8+ [len < sizeof(struct sockaddr)]: ...cast RHS to socklen_t, which is
9+ the type of len, to ensure type consistency.
10+
111 2020-06-03 Keith Marshall <keith@users.osdn.me>
212
313 Prepare and publish MinGW.org WSL-5.3.3 release.
--- a/w32api/include/ws2tcpip.h
+++ b/w32api/include/ws2tcpip.h
@@ -396,7 +396,7 @@ extern const struct in6_addr in6addr_loopback;
396396 ) == 0 \
397397 )
398398
399-typedef unsigned int socklen_t;
399+typedef int socklen_t;
400400
401401 typedef
402402 struct ipv6_mreq
--- a/w32api/include/wspiapi.h
+++ b/w32api/include/wspiapi.h
@@ -914,7 +914,7 @@ WSAAPI int __wspiapi_getnameinfo
914914 * Microsoft's invalid parameter handler, while reporting it as an
915915 * EAI_SYSTEM exception.
916916 */
917- if( (sa == NULL) || (len < sizeof( struct sockaddr )) )
917+ if( (sa == NULL) || (len < (socklen_t)(sizeof( struct sockaddr ))) )
918918 return __wspiapi_syserrout( EINVAL );
919919
920920 { /* When the "sa" argument is valid, we delegate the call to the
Show on old repository browser