diff options
author | selsta <selsta@sent.at> | 2021-06-24 17:16:48 +0200 |
---|---|---|
committer | selsta <selsta@sent.at> | 2021-06-27 23:43:36 +0200 |
commit | 8ae6c85efd67608ddccac954bd11129d22042a54 (patch) | |
tree | 67bca2716b2c5387d4909f331c2b1230f1431fed /src | |
parent | Merge pull request #7738 (diff) | |
download | monero-8ae6c85efd67608ddccac954bd11129d22042a54.tar.xz |
trezor: add #if for ByteSizeLong
Turns out Ubuntu 18.04 ships with an old protobuf version.
Diffstat (limited to 'src')
-rw-r--r-- | src/device_trezor/trezor/transport.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/device_trezor/trezor/transport.cpp b/src/device_trezor/trezor/transport.cpp index 194176413..fe4691aa0 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) { |