diff options
author | Khem Raj <raj.khem@gmail.com> | 2024-09-04 15:06:38 -0700 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2024-09-04 15:35:46 -0700 |
commit | 394f3537c520720df0bd7973fe8a4e727f7eb727 (patch) | |
tree | 54f5b3191bebb5f476342ae75e6ba68419d006ac /meta-oe/recipes-extended | |
parent | 68f542b606d7f4755e050e33d3cd28ac549b399b (diff) | |
download | meta-openembedded-394f3537c520720df0bd7973fe8a4e727f7eb727.tar.gz |
etcd-cpp-apiv3: Fix build with gprc 2.66+
GPR_ASSERT is removed from latest gprc
Fixes
| /home/pokybuild/yocto-worker/meta-oe/build/build/tmp-glibc/work/core2-64-poky-linux/etcd-cpp-apiv3/0.15.4/git/src/v3/Action.cpp: In member function 'void etcdv3::Action::waitForResponse()':
| /home/pokybuild/yocto-worker/meta-oe/build/build/tmp-glibc/work/core2-64-poky-linux/etcd-cpp-apiv3/0.15.4/git/src/v3/Action.cpp:101:5: error: 'GPR_ASSERT' was not declared in this scope
| 101 | GPR_ASSERT(got_tag == (void*) this);
| | ^~~~~~~~~~
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe/recipes-extended')
-rw-r--r-- | meta-oe/recipes-extended/etcd/etcd-cpp-apiv3/0001-Replacing-GPR_ASSERT-with-c-assert.patch | 33 | ||||
-rw-r--r-- | meta-oe/recipes-extended/etcd/etcd-cpp-apiv3_0.15.4.bb | 1 |
2 files changed, 34 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 @@ | |||
1 | From aeb34f58782fb6d06aea4f5cbeccb23a0224466e Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Wed, 4 Sep 2024 14:54:42 -0700 | ||
4 | Subject: [PATCH] Replacing GPR_ASSERT with c assert | ||
5 | |||
6 | Latest GRPC >= 2.66 has dropped GRPC_ASSERT macro [1] | ||
7 | |||
8 | [1] https://github.com/grpc/grpc/commit/0e23c2259da967a037e839e80cafd62bc6f9f68e | ||
9 | |||
10 | Upstream-Status: Submitted [https://github.com/etcd-cpp-apiv3/etcd-cpp-apiv3/pull/281] | ||
11 | Signed-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; | ||
diff --git a/meta-oe/recipes-extended/etcd/etcd-cpp-apiv3_0.15.4.bb b/meta-oe/recipes-extended/etcd/etcd-cpp-apiv3_0.15.4.bb index 7b7e3bc7af..0e6509d2d1 100644 --- a/meta-oe/recipes-extended/etcd/etcd-cpp-apiv3_0.15.4.bb +++ b/meta-oe/recipes-extended/etcd/etcd-cpp-apiv3_0.15.4.bb | |||
@@ -7,6 +7,7 @@ LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=eae7da6a2cd1788a5cf8a9f838cf6450" | |||
7 | SRC_URI = " \ | 7 | SRC_URI = " \ |
8 | git://github.com/etcd-cpp-apiv3/etcd-cpp-apiv3.git;branch=master;protocol=https \ | 8 | git://github.com/etcd-cpp-apiv3/etcd-cpp-apiv3.git;branch=master;protocol=https \ |
9 | file://0001-include-stdint.h-for-int64_t-types.patch \ | 9 | file://0001-include-stdint.h-for-int64_t-types.patch \ |
10 | file://0001-Replacing-GPR_ASSERT-with-c-assert.patch \ | ||
10 | " | 11 | " |
11 | 12 | ||
12 | SRCREV = "ba6216385fc332b23d95683966824c2b86c2474e" | 13 | SRCREV = "ba6216385fc332b23d95683966824c2b86c2474e" |