From: Voyager1 Date: Fri, 1 Nov 2013 05:54:10 +0000 (-0700) Subject: Merge pull request #3459 from Voyager1/fix-build X-Git-Tag: Gotham_alpha10~297 X-Git-Url: http://code.vuplus.com/gitweb/?a=commitdiff_plain;h=64ef7b9a36627ffd7b37dff32a8e8f1389cf6d7b;hp=ec8ee3345cff3b7689b5e5d33c2e943898a4c200;p=vuplus_xbmc Merge pull request #3459 from Voyager1/fix-build [Win32] improved resolution of conflict with namespace std::bind() --- diff --git a/xbmc/network/Network.cpp b/xbmc/network/Network.cpp index 7bbb7d5..d9b12c5 100644 --- a/xbmc/network/Network.cpp +++ b/xbmc/network/Network.cpp @@ -30,8 +30,6 @@ #include "utils/SystemInfo.h" #endif -using namespace std; - /* slightly modified in_ether taken from the etherboot project (http://sourceforge.net/projects/etherboot) */ bool in_ether (const char *bufp, unsigned char *addr) { @@ -169,8 +167,8 @@ CStdString CNetwork::GetHostName(void) CNetworkInterface* CNetwork::GetFirstConnectedInterface() { - vector& ifaces = GetInterfaceList(); - vector::const_iterator iter = ifaces.begin(); + std::vector& ifaces = GetInterfaceList(); + std::vector::const_iterator iter = ifaces.begin(); while (iter != ifaces.end()) { CNetworkInterface* iface = *iter; @@ -186,8 +184,8 @@ bool CNetwork::HasInterfaceForIP(unsigned long address) { unsigned long subnet; unsigned long local; - vector& ifaces = GetInterfaceList(); - vector::const_iterator iter = ifaces.begin(); + std::vector& ifaces = GetInterfaceList(); + std::vector::const_iterator iter = ifaces.begin(); while (iter != ifaces.end()) { CNetworkInterface* iface = *iter; @@ -213,7 +211,7 @@ bool CNetwork::IsAvailable(bool wait /*= false*/) // wait for 5 seconds here. } - vector& ifaces = GetInterfaceList(); + std::vector& ifaces = GetInterfaceList(); return (ifaces.size() != 0); } @@ -224,8 +222,8 @@ bool CNetwork::IsConnected() CNetworkInterface* CNetwork::GetInterfaceByName(CStdString& name) { - vector& ifaces = GetInterfaceList(); - vector::const_iterator iter = ifaces.begin(); + std::vector& ifaces = GetInterfaceList(); + std::vector::const_iterator iter = ifaces.begin(); while (iter != ifaces.end()) { CNetworkInterface* iface = *iter; @@ -471,7 +469,7 @@ int CreateTCPServerSocket(const int port, const bool bindLocal, const int backlo else s6->sin6_addr = in6addr_any; - if (::bind( sock, (struct sockaddr *) &addr, sizeof(struct sockaddr_in6)) < 0) + if (bind( sock, (struct sockaddr *) &addr, sizeof(struct sockaddr_in6)) < 0) { closesocket(sock); sock = -1; @@ -494,7 +492,7 @@ int CreateTCPServerSocket(const int port, const bool bindLocal, const int backlo else s4->sin_addr.s_addr = htonl(INADDR_ANY); - if (::bind( sock, (struct sockaddr *) &addr, sizeof(struct sockaddr_in)) < 0) + if (bind( sock, (struct sockaddr *) &addr, sizeof(struct sockaddr_in)) < 0) { closesocket(sock); CLog::Log(LOGERROR, "%s Server: Failed to bind ipv4 serversocket", callerName);