From ec31ed30cf68878931ca19084ee758cfa24feba0 Mon Sep 17 00:00:00 2001 From: Joel Bodenmann Date: Mon, 13 Nov 2023 02:59:29 +0100 Subject: [PATCH] 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. --- src/test/cpp/common/jtag.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/test/cpp/common/jtag.h b/src/test/cpp/common/jtag.h index 868c745..cca1ad2 100644 --- a/src/test/cpp/common/jtag.h +++ b/src/test/cpp/common/jtag.h @@ -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); } -}; \ No newline at end of file +};