aboutsummaryrefslogtreecommitdiff
path: root/ports/brpc
diff options
context:
space:
mode:
Diffstat (limited to 'ports/brpc')
-rw-r--r--ports/brpc/fix-protobuf-deprecated.patch13
-rw-r--r--ports/brpc/portfile.cmake1
-rw-r--r--ports/brpc/vcpkg.json2
3 files changed, 15 insertions, 1 deletions
diff --git a/ports/brpc/fix-protobuf-deprecated.patch b/ports/brpc/fix-protobuf-deprecated.patch
new file mode 100644
index 000000000..564724c63
--- /dev/null
+++ b/ports/brpc/fix-protobuf-deprecated.patch
@@ -0,0 +1,13 @@
+diff --git a/src/brpc/protocol.cpp b/src/brpc/protocol.cpp
+index 11297ea..c998edb 100644
+--- a/src/brpc/protocol.cpp
++++ b/src/brpc/protocol.cpp
+@@ -203,7 +203,7 @@ BUTIL_FORCE_INLINE bool ParsePbFromZeroCopyStreamInlined(
+ // According to source code of pb, SetTotalBytesLimit is not a simple set,
+ // avoid calling the function when the limit is definitely unreached.
+ if (PB_TOTAL_BYETS_LIMITS < FLAGS_max_body_size) {
+- decoder.SetTotalBytesLimit(INT_MAX, -1);
++ decoder.SetTotalBytesLimit(INT_MAX);
+ }
+ return msg->ParseFromCodedStream(&decoder) && decoder.ConsumedEntireMessage();
+ }
diff --git a/ports/brpc/portfile.cmake b/ports/brpc/portfile.cmake
index 3a1c1dce7..3547c6423 100644
--- a/ports/brpc/portfile.cmake
+++ b/ports/brpc/portfile.cmake
@@ -9,6 +9,7 @@ vcpkg_from_github(
PATCHES
fix_boost_ptr.patch
fix_thrift.patch
+ fix-protobuf-deprecated.patch
)
vcpkg_configure_cmake(
diff --git a/ports/brpc/vcpkg.json b/ports/brpc/vcpkg.json
index 61c1d27a3..2b2e15689 100644
--- a/ports/brpc/vcpkg.json
+++ b/ports/brpc/vcpkg.json
@@ -1,7 +1,7 @@
{
"name": "brpc",
"version-string": "0.9.7",
- "port-version": 1,
+ "port-version": 2,
"description": "Industrial-grade RPC framework used throughout Baidu, with 1,000,000+ instances and thousands kinds of services, called \"baidu-rpc\" inside Baidu.",
"homepage": "https://github.com/apache/incubator-brpc",
"supports": "!windows",