Skip to content

Commit 5938bf2

Browse files
committed
Fix Windows compilation error in AdbClientTest.cpp
Replace direct setenv() call with set_env() helper function that handles cross-platform differences (using _putenv_s on Windows and setenv on other platforms). This fixes the build failure: error C3861: 'setenv': identifier not found
1 parent e08f54c commit 5938bf2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lldb/unittests/Platform/Android/AdbClientTest.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ TEST_F(AdbClientTest, RealTcpConnection) {
113113
ASSERT_NE(unused_port, 0) << "Failed to find an unused port";
114114

115115
std::string port_str = std::to_string(unused_port);
116-
setenv("ANDROID_ADB_SERVER_PORT", port_str.c_str(), 1);
116+
set_env("ANDROID_ADB_SERVER_PORT", port_str.c_str());
117117

118118
AdbClient client;
119119
const auto status1 = client.Connect();

0 commit comments

Comments
 (0)