[opentelemetry-cpp] Fix warning and miss include files (#33861)

* [opentelemetry-cpp] Fix warning and miss include files

* version

* update patch

* version
This commit is contained in:
Frank 2023-09-23 07:03:49 +08:00 committed by GitHub
parent 0d5ed93c6d
commit 7c13895ff7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 32 additions and 1 deletions

View File

@ -0,0 +1,24 @@
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_);

View File

@ -18,6 +18,7 @@ vcpkg_from_github(
add-missing-dependencies.patch
# Missing find_dependency for Abseil
add-missing-find-dependency.patch
add-missing-include-file.patch
)
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS

View File

@ -2,6 +2,7 @@
"$schema": "https://raw.githubusercontent.com/microsoft/vcpkg-tool/main/docs/vcpkg.schema.json",
"name": "opentelemetry-cpp",
"version-semver": "1.9.1",
"port-version": 1,
"description": [
"OpenTelemetry is a collection of tools, APIs, and SDKs.",
"You use it to instrument, generate, collect, and export telemetry data (metrics, logs, and traces) for analysis in order to understand your software's performance and behavior."

View File

@ -6178,7 +6178,7 @@
},
"opentelemetry-cpp": {
"baseline": "1.9.1",
"port-version": 0
"port-version": 1
},
"opentelemetry-fluentd": {
"baseline": "2.0.0",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "3ad2a8625bd852a203f6156970c0eada6f90c192",
"version-semver": "1.9.1",
"port-version": 1
},
{
"git-tree": "47c5c172ee9a7c663746a3c1cbabb359a1cbaf56",
"version-semver": "1.9.1",