Fix compilation on Protobuf v30
This commit is contained in:
parent
a7811d0d8c
commit
fe376952de
2 changed files with 38 additions and 0 deletions
|
|
@ -0,0 +1,36 @@
|
|||
From 36c605004ae1c75813181ffe4c59907016aaf9e9 Mon Sep 17 00:00:00 2001
|
||||
From: Biswapriyo Nath <nathbappai@gmail.com>
|
||||
Date: Tue, 22 Apr 2025 15:12:23 +0000
|
||||
Subject: [PATCH] extras/libjsonpb: Fix incompatibility with protobuf v30
|
||||
|
||||
This commit fixes the following compiler error.
|
||||
|
||||
jsonpb.cpp:36:44: error: invalid operands to binary expression (
|
||||
'basic_string<char, char_traits<char>, allocator<char>>' and
|
||||
'internal::DescriptorStringView' (aka 'basic_string_view<char>'))
|
||||
36 | return std::string(kTypeUrlPrefix) + "/" + message.GetDescriptor()->full_name();
|
||||
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
More info here https://protobuf.dev/news/2024-10-02/#descriptor-apis
|
||||
|
||||
Change-Id: I3c76d51dfdfbe013eaa5031e6194bf5edae1be35
|
||||
---
|
||||
libjsonpb/parse/jsonpb.cpp | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/vendor/extras/libjsonpb/parse/jsonpb.cpp b/vendor/extras/libjsonpb/parse/jsonpb.cpp
|
||||
index b342c2b..ebd71bf 100644
|
||||
--- a/vendor/extras/libjsonpb/parse/jsonpb.cpp
|
||||
+++ b/vendor/extras/libjsonpb/parse/jsonpb.cpp
|
||||
@@ -33,7 +33,7 @@ using google::protobuf::util::TypeResolver;
|
||||
static constexpr char kTypeUrlPrefix[] = "type.googleapis.com";
|
||||
|
||||
std::string GetTypeUrl(const Message& message) {
|
||||
- return std::string(kTypeUrlPrefix) + "/" + message.GetDescriptor()->full_name();
|
||||
+ return std::string(kTypeUrlPrefix) + "/" + std::string(message.GetDescriptor()->full_name());
|
||||
}
|
||||
|
||||
ErrorOr<std::string> MessageToJsonString(const Message& message) {
|
||||
--
|
||||
2.49.0
|
||||
|
||||
|
|
@ -13,6 +13,8 @@ URL: http://developer.android.com/guide/developing/tools/
|
|||
Source0: https://github.com/nmeum/%{name}/releases/download/%{version}/%{name}-%{version}.tar.xz
|
||||
# https://github.com/nmeum/android-tools/issues/153
|
||||
Patch0: 0001-Fix-libusb-enumeration.patch
|
||||
# https://github.com/nmeum/android-tools/pull/172
|
||||
Patch1: 0002-extras-libjsonpb-Fix-incompatibility-with-protobuf-v30.patch
|
||||
|
||||
BuildRequires: brotli-devel
|
||||
BuildRequires: cmake
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue