diff --git a/third-party/libutp/README.md b/third-party/libutp/README.md index d7fca4c66..83270e69e 100644 --- a/third-party/libutp/README.md +++ b/third-party/libutp/README.md @@ -45,6 +45,13 @@ from libutp: cd utp_test && make +## Packaging and API + +The libutp API is considered unstable, and probably always will be. We encourage +you to test with the version of libutp you have, and be mindful when upgrading. +For this reason, it is probably also a good idea to bundle libutp with your +application. + ## License libutp is released under the [MIT][lic] license. diff --git a/third-party/libutp/utp.cpp b/third-party/libutp/utp.cpp index 17d6e720d..db99c8ffa 100644 --- a/third-party/libutp/utp.cpp +++ b/third-party/libutp/utp.cpp @@ -120,7 +120,7 @@ struct PACKED_ATTRIBUTE PackedSockAddr { byte get_family() const { - return (IN6_IS_ADDR_V4MAPPED((in6_addr*)_sin6) != 0) ? AF_INET : AF_INET6; + return (IN6_IS_ADDR_V4MAPPED(&_in._in6addr) != 0) ? AF_INET : AF_INET6; } bool operator==(const PackedSockAddr& rhs) const