mirror of
https://github.com/caiwx86/small-packages.git
synced 2026-11-14 20:29:29 +08:00
update 2026-09-24 16:56:26
This commit is contained in:
1 parent
b31a5c3878
commit
e4cee331e9
6885 files changed
+3240523
No files matched your search
@@ -0,0 +1,64 @@
|
||||
--- 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;
|
||||
Reference in new issue
Block a user