From 801897325714e1b11875ad9b48f3644ed1ea9100 Mon Sep 17 00:00:00 2001 From: Juliusz Chroboczek Date: Mon, 25 Jul 2011 19:27:17 +0000 Subject: [PATCH] Resynchronise with upstream libutp.c, commit 4be31bb7. --- third-party/libutp/README.md | 7 +++++++ third-party/libutp/utp.cpp | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) 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