From 0226b2b784e87b4a85aeb2218adf07468ed7d9ec Mon Sep 17 00:00:00 2001 From: Jeffrey Walton Date: Sun, 12 Jun 2016 23:54:42 -0400 Subject: [PATCH] Fix "u_short was not declared in this scope" (Issue 187) --- socketft.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/socketft.cpp b/socketft.cpp index ef66ba00..42a00182 100644 --- a/socketft.cpp +++ b/socketft.cpp @@ -141,7 +141,7 @@ void Socket::Bind(unsigned int port, const char *addr) sa.sin_addr.s_addr = result; } - sa.sin_port = htons((u_short)port); + sa.sin_port = htons((unsigned short)port); Bind((sockaddr *)&sa, sizeof(sa)); } @@ -183,7 +183,7 @@ bool Socket::Connect(const char *addr, unsigned int port) } } - sa.sin_port = htons((u_short)port); + sa.sin_port = htons((unsigned short)port); return Connect((const sockaddr *)&sa, sizeof(sa)); } @@ -283,7 +283,7 @@ bool Socket::ReceiveReady(const timeval *timeout) #ifdef CRYPTOPP_MSAN __msan_unpoison(&fds, sizeof(fds)); #endif - + int ready; if (timeout == NULL) ready = select((int)m_s+1, &fds, NULL, NULL, NULL);