forked from envoyproxy/envoy
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathio_opentelemetry_cpp.patch
More file actions
97 lines (84 loc) · 3.26 KB
/
io_opentelemetry_cpp.patch
File metadata and controls
97 lines (84 loc) · 3.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
From b0825190258f28a7e72b62dfc00835cc277a059e Mon Sep 17 00:00:00 2001
From: Rohit Agrawal <rohit.agrawal@databricks.com>
Date: Fri, 25 Apr 2025 19:03:41 -0700
Subject: [PATCH] Fixes glibc++ 5 Checks
---
api/include/opentelemetry/config.h | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/api/include/opentelemetry/config.h b/api/include/opentelemetry/config.h
index 21a2947e28..c41f2e7ef8 100644
--- a/api/include/opentelemetry/config.h
+++ b/api/include/opentelemetry/config.h
@@ -3,12 +3,9 @@
#pragma once
-#ifndef __has_include
-# define OPENTELEMETRY_HAS_INCLUDE(x) 0
-#else
-# define OPENTELEMETRY_HAS_INCLUDE(x) __has_include(x)
-#endif
+#include <type_traits> // IWYU pragma: keep
-#if !defined(__GLIBCXX__) || OPENTELEMETRY_HAS_INCLUDE(<codecvt>) // >= libstdc++-5
+#if !defined(__GLIBCXX__) || (defined(_GLIBCXX_RELEASE) && _GLIBCXX_RELEASE >= 7) || \
+ (defined(__GLIBCXX__) && __GLIBCXX__ >= 20150422) // >= libstdc++-5
# define OPENTELEMETRY_TRIVIALITY_TYPE_TRAITS
#endif
From 2e07c15ccb5f888fcdb42a1a60e22551e46c708c Mon Sep 17 00:00:00 2001
From: owent <admin@owent.net>
Date: Sun, 27 Apr 2025 17:29:17 +0800
Subject: [PATCH 2/2] Always checking `OPENTELEMETRY_TRIVIALITY_TYPE_TRAITS`
when `OPENTELEMETRY_STL_VERSION` is defined
---
api/include/opentelemetry/config.h | 11 -----------
api/include/opentelemetry/nostd/type_traits.h | 9 +++++++--
sdk/include/opentelemetry/sdk_config.h | 1 -
3 files changed, 7 insertions(+), 14 deletions(-)
delete mode 100644 api/include/opentelemetry/config.h
diff --git a/api/include/opentelemetry/config.h b/api/include/opentelemetry/config.h
deleted file mode 100644
index c41f2e7ef8..0000000000
--- a/api/include/opentelemetry/config.h
+++ /dev/null
@@ -1,11 +0,0 @@
-// Copyright The OpenTelemetry Authors
-// SPDX-License-Identifier: Apache-2.0
-
-#pragma once
-
-#include <type_traits> // IWYU pragma: keep
-
-#if !defined(__GLIBCXX__) || (defined(_GLIBCXX_RELEASE) && _GLIBCXX_RELEASE >= 7) || \
- (defined(__GLIBCXX__) && __GLIBCXX__ >= 20150422) // >= libstdc++-5
-# define OPENTELEMETRY_TRIVIALITY_TYPE_TRAITS
-#endif
diff --git a/api/include/opentelemetry/nostd/type_traits.h b/api/include/opentelemetry/nostd/type_traits.h
index 3a64b5db1a..a797c1ea07 100644
--- a/api/include/opentelemetry/nostd/type_traits.h
+++ b/api/include/opentelemetry/nostd/type_traits.h
@@ -10,15 +10,20 @@
# endif
#endif
+#include <type_traits>
+
#if !defined(OPENTELEMETRY_HAVE_STD_TYPE_TRAITS)
# include <array>
-# include <type_traits>
-# include "opentelemetry/config.h"
# include "opentelemetry/nostd/detail/void.h" // IWYU pragma: export
# include "opentelemetry/version.h"
#endif
+#if !defined(__GLIBCXX__) || (defined(_GLIBCXX_RELEASE) && _GLIBCXX_RELEASE >= 7) || \
+ (defined(__GLIBCXX__) && __GLIBCXX__ >= 20150422) // >= libstdc++-5
+# define OPENTELEMETRY_TRIVIALITY_TYPE_TRAITS
+#endif
+
OPENTELEMETRY_BEGIN_NAMESPACE
namespace nostd
{
diff --git a/sdk/include/opentelemetry/sdk_config.h b/sdk/include/opentelemetry/sdk_config.h
index 280ccaa993..afe78f1d80 100644
--- a/sdk/include/opentelemetry/sdk_config.h
+++ b/sdk/include/opentelemetry/sdk_config.h
@@ -3,5 +3,4 @@
#pragma once
-#include "opentelemetry/config.h"
#include "opentelemetry/sdk/common/global_log_handler.h"