aboutsummaryrefslogtreecommitdiff
path: root/src/device_trezor
diff options
context:
space:
mode:
authorluigi1111 <luigi1111w@gmail.com>2021-07-10 18:00:45 -0400
committerluigi1111 <luigi1111w@gmail.com>2021-07-10 18:00:45 -0400
commit1e8cbc995f7b2eac69e50921d35c5971446c5be5 (patch)
treee7649980be418b07046f6d061f21ba004b613b7a /src/device_trezor
parentMerge pull request #7761 (diff)
parenttrezor: add #if for ByteSizeLong (diff)
downloadmonero-1e8cbc995f7b2eac69e50921d35c5971446c5be5.tar.xz
Merge pull request #7762
8ae6c85 trezor: add #if for ByteSizeLong (selsta)
Diffstat (limited to 'src/device_trezor')
-rw-r--r--src/device_trezor/trezor/transport.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/device_trezor/trezor/transport.cpp b/src/device_trezor/trezor/transport.cpp
index 7a79d8f95..881848a80 100644
--- a/src/device_trezor/trezor/transport.cpp
+++ b/src/device_trezor/trezor/transport.cpp
@@ -157,7 +157,11 @@ namespace trezor{
#define PROTO_HEADER_SIZE 6
static size_t message_size(const google::protobuf::Message &req){
+#if GOOGLE_PROTOBUF_VERSION < 3006001
+ return size_t(req.ByteSize());
+#else
return req.ByteSizeLong();
+#endif
}
static size_t serialize_message_buffer_size(size_t msg_size) {