mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-20 04:02:27 +00:00
games/xevil: unbreak build with Clang 6 (C++14 by default)
libc++ doesn't like "using namespace std" in C++11 role.cpp:656:62: error: invalid operands to binary expression ('__bind<int &, sockaddr *, unsigned long>' and 'int') if (bind(udpSock,(CMN_SOCKADDR *)&client,sizeof(client)) >= 0) { ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~ role.cpp:1829:70: error: invalid operands to binary expression ('__bind<int &, sockaddr *, unsigned long>' and 'int') if (bind(tcpSock, (CMN_SOCKADDR *)&serverAddr, sizeof(serverAddr)) < 0) { ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~ role.cpp:1836:70: error: invalid operands to binary expression ('__bind<int &, sockaddr *, unsigned long>' and 'int') if (bind(udpSock, (CMN_SOCKADDR *)&serverAddr, sizeof(serverAddr)) < 0) { ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~ serverping.cpp:173:60: error: invalid operands to binary expression ('__bind<int &, sockaddr *, unsigned long>' and 'int') if (bind(udpSock,(CMN_SOCKADDR *)&client,sizeof(client)) < 0) { ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~ Reported by: pkg-fallout
This commit is contained in:
parent
9d652e8151
commit
31ab75204c
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=460007
@ -82,7 +82,14 @@
|
||||
// Probably would be better to use Role::message(), but we want it to stay
|
||||
// up for a long time. Should add argument to Role::message().
|
||||
|
||||
@@ -663,12 +659,10 @@
|
||||
@@ -657,18 +653,16 @@ void Client::connect_server() {
|
||||
client.sin_family = AF_INET;
|
||||
client.sin_addr.s_addr = htonl(INADDR_ANY);
|
||||
client.sin_port = htons((u_short)(clientPortBase + n));
|
||||
- if (bind(udpSock,(CMN_SOCKADDR *)&client,sizeof(client)) >= 0) {
|
||||
+ if (::bind(udpSock,(CMN_SOCKADDR *)&client,sizeof(client)) >= 0) {
|
||||
// Success.
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (n == CLIENT_PORT_TRIES) {
|
||||
@ -247,11 +254,13 @@
|
||||
// Hack, using errLocator for more than reporting errors.
|
||||
errLocator->set_remember_deleted(True);
|
||||
errLocator->set_remember_sounds(True);
|
||||
@@ -1843,19 +1827,17 @@
|
||||
@@ -1842,20 +1826,18 @@ void Server::run() {
|
||||
serverAddr.sin_port = htons(port);
|
||||
|
||||
// Give address to both the TCP and UDP sockets.
|
||||
if (bind(tcpSock, (CMN_SOCKADDR *)&serverAddr, sizeof(serverAddr)) < 0) {
|
||||
- if (bind(tcpSock, (CMN_SOCKADDR *)&serverAddr, sizeof(serverAddr)) < 0) {
|
||||
- ostrstream str;
|
||||
+ if (::bind(tcpSock, (CMN_SOCKADDR *)&serverAddr, sizeof(serverAddr)) < 0) {
|
||||
+ stringstream str;
|
||||
str << "Couldn't bind socket name to TCP socket on port "
|
||||
- << port << "." << ends;
|
||||
@ -261,8 +270,9 @@
|
||||
+ error(str.str().c_str());
|
||||
return;
|
||||
}
|
||||
if (bind(udpSock, (CMN_SOCKADDR *)&serverAddr, sizeof(serverAddr)) < 0) {
|
||||
- if (bind(udpSock, (CMN_SOCKADDR *)&serverAddr, sizeof(serverAddr)) < 0) {
|
||||
- ostrstream str;
|
||||
+ if (::bind(udpSock, (CMN_SOCKADDR *)&serverAddr, sizeof(serverAddr)) < 0) {
|
||||
+ stringstream str;
|
||||
str << "Couldn't bind socket name to UDP socket on port "
|
||||
- << port << "." << ends;
|
||||
|
@ -41,14 +41,16 @@
|
||||
|
||||
// Create server address.
|
||||
memset((void *)&serverAddr,'\0',sizeof(serverAddr));
|
||||
@@ -171,10 +171,9 @@
|
||||
@@ -170,11 +170,10 @@ ServerPing::ServerPing(int argc,char** argv) {
|
||||
client.sin_family = AF_INET;
|
||||
client.sin_addr.s_addr = htonl(INADDR_ANY);
|
||||
client.sin_port = htons((u_short)clientPort);
|
||||
if (bind(udpSock,(CMN_SOCKADDR *)&client,sizeof(client)) < 0) {
|
||||
- if (bind(udpSock,(CMN_SOCKADDR *)&client,sizeof(client)) < 0) {
|
||||
- ostrstream str;
|
||||
- str << "Could not bind local UDP port " << clientPort << ends;
|
||||
- error(str.str());
|
||||
- delete str.str();
|
||||
+ if (::bind(udpSock,(CMN_SOCKADDR *)&client,sizeof(client)) < 0) {
|
||||
+ stringstream str;
|
||||
+ str << "Could not bind local UDP port " << clientPort;
|
||||
+ error(str.str().c_str());
|
||||
|
Loading…
Reference in New Issue
Block a user