Skip to content

Commit

Permalink
Fix ambiguous function call to bind()
Browse files Browse the repository at this point in the history
The call to bind() can actually resolve to std::bind() instead of
libc's bind(). Ensure that we're definitely calling the correct one.
  • Loading branch information
Tectu committed Nov 13, 2023
1 parent 79e2ae2 commit ec31ed3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/test/cpp/common/jtag.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ class Jtag : public TimeProcess{
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);
Expand Down Expand Up @@ -174,4 +174,4 @@ class Jtag : public TimeProcess{
schedule(tooglePeriod);
}

};
};

0 comments on commit ec31ed3

Please sign in to comment.