Browse Source

std namespace checks that need to be fixed in c++17

using namespace std is causing issues with bind, using :: to workaround for now until c++17 update
Image 3 years ago
parent
commit
d82d5cf9bd
2 changed files with 2 additions and 2 deletions
  1. 1 1
      EQ2/source/common/EQStreamFactory.cpp
  2. 1 1
      EQ2/source/common/TCPConnection.cpp

+ 1 - 1
EQ2/source/common/EQStreamFactory.cpp

@@ -121,7 +121,7 @@ struct sockaddr_in address;
 		return false;
 	}
 
-	if (bind(sock, (struct sockaddr *) &address, sizeof(address)) < 0) {
+	if (::bind(sock, (struct sockaddr *) &address, sizeof(address)) < 0) {
 		//close(sock);
 		sock=-1;
 		return false;

+ 1 - 1
EQ2/source/common/TCPConnection.cpp

@@ -1582,7 +1582,7 @@ bool TCPServer::Open(int16 in_port, char* errbuf) {
 	setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, (char *) &reuse_addr, sizeof(reuse_addr));
 
 
-	if (bind(sock, (struct sockaddr *) &address, sizeof(address)) < 0) {
+	if (::bind(sock, (struct sockaddr *) &address, sizeof(address)) < 0) {
 #ifdef WIN32
 		closesocket(sock);
 #else