Fix "u_short was not declared in this scope" (Issue 187)

pull/200/head
Jeffrey Walton 2016-06-12 23:54:42 -04:00
parent b1e3063f11
commit 0226b2b784
1 changed files with 3 additions and 3 deletions

View File

@ -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));
}