You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

64 lines
2.8 KiB

  1. --- a/ipc_remote.cc
  2. +++ b/ipc_remote.cc
  3. @@ -914,7 +914,7 @@ int RootIPCRemote::OpenFDPassSock() {
  4. return -1;
  5. }
  6. - if (bind(ipc_fd_fd, (const struct sockaddr *) &unixsock, sizeof(unixsock))) {
  7. + if (::bind(ipc_fd_fd, (const struct sockaddr *) &unixsock, sizeof(unixsock))) {
  8. close(ipc_fd_fd);
  9. _MSG("Failed to bind socket to pass file descriptors: " +
  10. string(strerror(errno)), MSGFLAG_ERROR);
  11. --- a/packetsource_wext.cc
  12. +++ b/packetsource_wext.cc
  13. @@ -405,7 +405,7 @@ void PacketSource_Wext::OpenWpaSupplican
  14. wpa_local.sun_family = AF_UNIX;
  15. snprintf(wpa_local.sun_path, sizeof(wpa_local.sun_path),
  16. "%s", wpa_local_path.c_str());
  17. - if (bind(wpa_sock, (struct sockaddr *) &wpa_local, sizeof(wpa_local)) < 0) {
  18. + if (::bind(wpa_sock, (struct sockaddr *) &wpa_local, sizeof(wpa_local)) < 0) {
  19. _MSG("Source '" + parent + "' failed to bind local socket for "
  20. "wpa_supplicant, disabling scan_wpa: " + string(strerror(errno)),
  21. MSGFLAG_PRINTERROR);
  22. --- a/tcpclient.cc
  23. +++ b/tcpclient.cc
  24. @@ -75,7 +75,7 @@ int TcpClient::Connect(const char *in_re
  25. local_sock.sin_addr.s_addr = htonl(INADDR_ANY);
  26. local_sock.sin_port = htons(0);
  27. - if (bind(cli_fd, (struct sockaddr *) &local_sock, sizeof(local_sock)) < 0) {
  28. + if (::bind(cli_fd, (struct sockaddr *) &local_sock, sizeof(local_sock)) < 0) {
  29. snprintf(errstr, 1024, "TCP client bind() failed: %s", strerror(errno));
  30. globalreg->messagebus->InjectMessage(errstr, MSGFLAG_ERROR);
  31. close(cli_fd);
  32. @@ -170,7 +170,7 @@ int TcpClient::ConnectSync(const char *i
  33. local_sock.sin_addr.s_addr = htonl(INADDR_ANY);
  34. local_sock.sin_port = htons(0);
  35. - if (bind(cli_fd, (struct sockaddr *) &local_sock, sizeof(local_sock)) < 0) {
  36. + if (::bind(cli_fd, (struct sockaddr *) &local_sock, sizeof(local_sock)) < 0) {
  37. snprintf(errstr, 1024, "TCP client bind() failed: %s", strerror(errno));
  38. globalreg->messagebus->InjectMessage(errstr, MSGFLAG_ERROR);
  39. close(cli_fd);
  40. --- a/tcpserver.cc
  41. +++ b/tcpserver.cc
  42. @@ -84,7 +84,7 @@ int TcpServer::EnableServer() {
  43. }
  44. // Bind the socket
  45. - if (bind(serv_fd, (struct sockaddr *) &serv_sock, sizeof(serv_sock)) < 0) {
  46. + if (::bind(serv_fd, (struct sockaddr *) &serv_sock, sizeof(serv_sock)) < 0) {
  47. snprintf(errstr, STATUS_MAX, "TCP server bind() failed: %s",
  48. strerror(errno));
  49. globalreg->messagebus->InjectMessage(errstr, MSGFLAG_ERROR);
  50. --- a/unixdomainserver.cc
  51. +++ b/unixdomainserver.cc
  52. @@ -64,7 +64,7 @@ int UnixDomainServer::EnableServer() {
  53. }
  54. // Bind the socket
  55. - if (bind(serv_fd, (struct sockaddr *) &serv_sock, sizeof(serv_sock)) < 0) {
  56. + if (::bind(serv_fd, (struct sockaddr *) &serv_sock, sizeof(serv_sock)) < 0) {
  57. _MSG("Unix domain server bind() failed: " + string(strerror(errno)),
  58. MSGFLAG_ERROR);
  59. return -1;