mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-24 05:07:54 +08:00
7c13895ff7
* [opentelemetry-cpp] Fix warning and miss include files * version * update patch * version
25 lines
714 B
Diff
25 lines
714 B
Diff
diff --git a/exporters/jaeger/src/TUDPTransport.cc b/exporters/jaeger/src/TUDPTransport.cc
|
|
index e411127..a5e08fa 100644
|
|
--- a/exporters/jaeger/src/TUDPTransport.cc
|
|
+++ b/exporters/jaeger/src/TUDPTransport.cc
|
|
@@ -2,7 +2,9 @@
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
#include <sstream> // std::stringstream
|
|
-
|
|
+#ifndef _MSC_VER
|
|
+#include <unistd.h>
|
|
+#endif
|
|
#include "TUDPTransport.h"
|
|
#include "opentelemetry/sdk_config.h"
|
|
|
|
@@ -48,7 +50,7 @@ void TUDPTransport::open()
|
|
hints.ai_socktype = SOCK_DGRAM;
|
|
hints.ai_flags = AI_PASSIVE | AI_ADDRCONFIG;
|
|
|
|
- sprintf(port, "%d", port_);
|
|
+ snprintf(port, sizeof(port), "%d", port_);
|
|
|
|
error = getaddrinfo(host_.c_str(), port, &hints, &server_addr_info_);
|
|
|