summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-extended/etcd/etcd-cpp-apiv3/0001-Replacing-GPR_ASSERT-with-c-assert.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-oe/recipes-extended/etcd/etcd-cpp-apiv3/0001-Replacing-GPR_ASSERT-with-c-assert.patch')
-rw-r--r--meta-oe/recipes-extended/etcd/etcd-cpp-apiv3/0001-Replacing-GPR_ASSERT-with-c-assert.patch33
1 files changed, 33 insertions, 0 deletions
diff --git a/meta-oe/recipes-extended/etcd/etcd-cpp-apiv3/0001-Replacing-GPR_ASSERT-with-c-assert.patch b/meta-oe/recipes-extended/etcd/etcd-cpp-apiv3/0001-Replacing-GPR_ASSERT-with-c-assert.patch
new file mode 100644
index 0000000000..87000b663d
--- /dev/null
+++ b/meta-oe/recipes-extended/etcd/etcd-cpp-apiv3/0001-Replacing-GPR_ASSERT-with-c-assert.patch
@@ -0,0 +1,33 @@
1From aeb34f58782fb6d06aea4f5cbeccb23a0224466e Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 4 Sep 2024 14:54:42 -0700
4Subject: [PATCH] Replacing GPR_ASSERT with c assert
5
6Latest GRPC >= 2.66 has dropped GRPC_ASSERT macro [1]
7
8[1] https://github.com/grpc/grpc/commit/0e23c2259da967a037e839e80cafd62bc6f9f68e
9
10Upstream-Status: Submitted [https://github.com/etcd-cpp-apiv3/etcd-cpp-apiv3/pull/281]
11Signed-off-by: Khem Raj <raj.khem@gmail.com>
12---
13 src/v3/Action.cpp | 9 +++++++++
14 1 file changed, 9 insertions(+)
15
16--- a/src/v3/Action.cpp
17+++ b/src/v3/Action.cpp
18@@ -2,6 +2,15 @@
19 #include <grpc/support/log.h>
20 #include <grpcpp/support/status.h>
21 #include "etcd/v3/action_constants.hpp"
22+#include <cstdlib>
23+
24+#ifndef GPR_ASSERT
25+#define GPR_ASSERT(x) \
26+ if (!(x)) { \
27+ fprintf(stderr, "%s:%d assert failed\n", __FILE__, __LINE__); \
28+ abort(); \
29+}
30+#endif
31
32 etcdv3::Action::Action(etcdv3::ActionParameters const& params) {
33 parameters = params;