Fix ambiguous function call to bind()

The call to bind() can actually resolve to std::bind() instead of
libc's bind(). Ensure that we're definitely calling the correct one.
This commit is contained in:
Joel Bodenmann 2023-11-13 02:59:29 +01:00
parent 79e2ae248b
commit ec31ed30cf
1 changed files with 2 additions and 2 deletions

View File

@ -82,7 +82,7 @@ public:
memset(serverAddr.sin_zero, '\0', sizeof serverAddr.sin_zero);
//---- Bind the address struct to the socket ----//
bind(serverSocket, (struct sockaddr *) &serverAddr, sizeof(serverAddr));
::bind(serverSocket, (struct sockaddr *) &serverAddr, sizeof(serverAddr));
//---- Listen on the socket, with 5 max connection requests queued ----//
listen(serverSocket,1);
@ -174,4 +174,4 @@ public:
schedule(tooglePeriod);
}
};
};