aboutsummaryrefslogtreecommitdiff
path: root/ports/brpc/fix-protobuf-deprecated.patch
diff options
context:
space:
mode:
authorCarlos O'Ryan <coryan@users.noreply.github.com>2021-09-22 13:09:55 -0700
committerGitHub <noreply@github.com>2021-09-22 13:09:55 -0700
commitb29f8ef37edb1cedd5c2e403dbcb355443b939f6 (patch)
tree4ccc9c0b3655d54b05c41e88f3e129125eac1800 /ports/brpc/fix-protobuf-deprecated.patch
parent93885afd50ff1a1408e1785dceffb01ff648c7d9 (diff)
downloadvcpkg-b29f8ef37edb1cedd5c2e403dbcb355443b939f6.tar.gz
vcpkg-b29f8ef37edb1cedd5c2e403dbcb355443b939f6.zip
[protobuf] upgrade to latest release (v3.18.0) (#20208)
* [protobuf] upgrade to latest release (v3.18.0) This requires patching OpenCV as it uses a function removed in the latest version of protobuf (FWIW, upstream OpenCV has a similar patch). * The arcus port also needs a patch * The caffe2 port also needs a patch * The brpc port also needs a patch
Diffstat (limited to 'ports/brpc/fix-protobuf-deprecated.patch')
-rw-r--r--ports/brpc/fix-protobuf-deprecated.patch13
1 files changed, 13 insertions, 0 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();
+ }