fix stun prober return fail in windows
stun_prober will fail on Windows and return RESOLVE_FAILED Bug: webrtc:378688998 Change-Id: I3b957f6b2adf6658a0f6b83c8ff427ffd9779f8c Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/368140 Commit-Queue: Per Kjellander <perkj@webrtc.org> Reviewed-by: Per Kjellander <perkj@webrtc.org> Reviewed-by: Jeremy Leconte <jleconte@webrtc.org> Cr-Commit-Position: refs/heads/main@{#43405}
This commit is contained in:
parent
f54707cd71
commit
b2fc13d094
@ -891,5 +891,10 @@ if (!build_with_chromium) {
|
||||
"//third_party/abseil-cpp/absl/flags:flag",
|
||||
"//third_party/abseil-cpp/absl/flags:parse",
|
||||
]
|
||||
if (is_win) {
|
||||
deps += [
|
||||
"../rtc_base:win32_socket_init",
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -28,6 +28,10 @@
|
||||
#include "rtc_base/time_utils.h"
|
||||
#include "test/scoped_key_value_config.h"
|
||||
|
||||
#ifdef WEBRTC_WIN
|
||||
#include "rtc_base/win32_socket_init.h"
|
||||
#endif // WEBRTC_WIN
|
||||
|
||||
using stunprober::AsyncCallback;
|
||||
using stunprober::StunProber;
|
||||
|
||||
@ -108,6 +112,9 @@ void StopTrial(rtc::Thread* thread, StunProber* prober, int result) {
|
||||
} // namespace
|
||||
|
||||
int main(int argc, char* argv[]) {
|
||||
#ifdef WEBRTC_WIN
|
||||
rtc::WinsockInitializer winsock_init;
|
||||
#endif // WEBRTC_WIN
|
||||
absl::ParseCommandLine(argc, argv);
|
||||
|
||||
std::vector<rtc::SocketAddress> server_addresses;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user