|
|
- --- a/ipc_remote.cc
- +++ b/ipc_remote.cc
- @@ -914,7 +914,7 @@ int RootIPCRemote::OpenFDPassSock() {
- return -1;
- }
-
- - if (bind(ipc_fd_fd, (const struct sockaddr *) &unixsock, sizeof(unixsock))) {
- + if (::bind(ipc_fd_fd, (const struct sockaddr *) &unixsock, sizeof(unixsock))) {
- close(ipc_fd_fd);
- _MSG("Failed to bind socket to pass file descriptors: " +
- string(strerror(errno)), MSGFLAG_ERROR);
- --- a/packetsource_wext.cc
- +++ b/packetsource_wext.cc
- @@ -405,7 +405,7 @@ void PacketSource_Wext::OpenWpaSupplican
- wpa_local.sun_family = AF_UNIX;
- snprintf(wpa_local.sun_path, sizeof(wpa_local.sun_path),
- "%s", wpa_local_path.c_str());
- - if (bind(wpa_sock, (struct sockaddr *) &wpa_local, sizeof(wpa_local)) < 0) {
- + if (::bind(wpa_sock, (struct sockaddr *) &wpa_local, sizeof(wpa_local)) < 0) {
- _MSG("Source '" + parent + "' failed to bind local socket for "
- "wpa_supplicant, disabling scan_wpa: " + string(strerror(errno)),
- MSGFLAG_PRINTERROR);
- --- a/tcpclient.cc
- +++ b/tcpclient.cc
- @@ -75,7 +75,7 @@ int TcpClient::Connect(const char *in_re
- local_sock.sin_addr.s_addr = htonl(INADDR_ANY);
- local_sock.sin_port = htons(0);
-
- - if (bind(cli_fd, (struct sockaddr *) &local_sock, sizeof(local_sock)) < 0) {
- + if (::bind(cli_fd, (struct sockaddr *) &local_sock, sizeof(local_sock)) < 0) {
- snprintf(errstr, 1024, "TCP client bind() failed: %s", strerror(errno));
- globalreg->messagebus->InjectMessage(errstr, MSGFLAG_ERROR);
- close(cli_fd);
- @@ -170,7 +170,7 @@ int TcpClient::ConnectSync(const char *i
- local_sock.sin_addr.s_addr = htonl(INADDR_ANY);
- local_sock.sin_port = htons(0);
-
- - if (bind(cli_fd, (struct sockaddr *) &local_sock, sizeof(local_sock)) < 0) {
- + if (::bind(cli_fd, (struct sockaddr *) &local_sock, sizeof(local_sock)) < 0) {
- snprintf(errstr, 1024, "TCP client bind() failed: %s", strerror(errno));
- globalreg->messagebus->InjectMessage(errstr, MSGFLAG_ERROR);
- close(cli_fd);
- --- a/tcpserver.cc
- +++ b/tcpserver.cc
- @@ -84,7 +84,7 @@ int TcpServer::EnableServer() {
- }
-
- // Bind the socket
- - if (bind(serv_fd, (struct sockaddr *) &serv_sock, sizeof(serv_sock)) < 0) {
- + if (::bind(serv_fd, (struct sockaddr *) &serv_sock, sizeof(serv_sock)) < 0) {
- snprintf(errstr, STATUS_MAX, "TCP server bind() failed: %s",
- strerror(errno));
- globalreg->messagebus->InjectMessage(errstr, MSGFLAG_ERROR);
- --- a/unixdomainserver.cc
- +++ b/unixdomainserver.cc
- @@ -64,7 +64,7 @@ int UnixDomainServer::EnableServer() {
- }
-
- // Bind the socket
- - if (bind(serv_fd, (struct sockaddr *) &serv_sock, sizeof(serv_sock)) < 0) {
- + if (::bind(serv_fd, (struct sockaddr *) &serv_sock, sizeof(serv_sock)) < 0) {
- _MSG("Unix domain server bind() failed: " + string(strerror(errno)),
- MSGFLAG_ERROR);
- return -1;
|