mirror of
https://github.com/rwinkhart/sys.git
synced 2026-08-28 04:46:44 -04:00
Fixes wrong data type used in Windows recvfrom and sendto calls In Windows, `int` refers to a 32-bit signed integer (https://docs.microsoft.com/en-us/windows/win32/winprog/windows-data-types#int). However, the current implementation (https://golang.org/cl/208321) uses the `int` type, which can have a different size. This is especially important when recvfrom` returns a 32bit value of `-1`, indicating an error, since it is interpreted as the 64bit value 4294967295. Change-Id: Ib966ff317b0be7e29e48ee373a794cd0267fb007 GitHub-Last-Rev: 9aad4c377f41ca915d0ddbfa1b87fec57bf1cb58 GitHub-Pull-Request: golang/sys#51 Reviewed-on: https://go-review.googlesource.com/c/sys/+/211998 Reviewed-by: Ian Lance Taylor <iant@golang.org>