misc: Use the protobuf version to choose between ByteSize(Long).
authorGabe Black <gabeblack@google.com>
Wed, 29 Apr 2020 06:40:17 +0000 (23:40 -0700)
committerTommaso Marinelli <tommarin@ucm.es>
Wed, 29 Apr 2020 21:46:11 +0000 (21:46 +0000)
commit4773c6fafff3381a238f214c68130c7bfe02400d
tree5e723d58503d7cbace11d8b33ebcd744ccfd84c6
parentcc2f48ccfc2cc87b887baa542c9d0aeee6b8709e
misc: Use the protobuf version to choose between ByteSize(Long).

Older versions of protobuf are apparently still what's provided with
some current versions of some distributions. To avoid breaking the build
on those distributions and to avoid an annoying deprecation warning on
newer systems, check GOOGLE_PROTOBUF_VERSION to choose which to use.

According to the CHANGES.txt file here:

https://github.com/protocolbuffers/protobuf/blob/master/CHANGES.txt

The new ByteSizeLong function was introduced in version 3.1.0 in 2016.

Change-Id: I7f8eeda144bf9556d17d7a0a741996f3137b48b4
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/28287
Reviewed-by: Tommaso Marinelli <tommarin@ucm.es>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
src/proto/protoio.cc