@cryptotaxi247 / netdata-1 / commits / 6aac1b76a

Fix a warning in prometheus remote write backend (#7609)

* Change deprecated method to a new one * Change the minimum required version of protobuf

Vladimir Kobal committed Dec 24, 2019 at 13:00 UTC 6aac1b76aea6e92b37e20349041c4370d9fc045b
3 files changed +3 -3
CMakeLists.txt
+1 -1
@@ -256,7 +256,7 @@ find_library(HAVE_KINESIS aws-cpp-sdk-kinesis)
256 # -----------------------------------------------------------------------------
257 # Detect libprotobuf
258
259 -pkg_check_modules(PROTOBUF protobuf)
259 +pkg_check_modules(PROTOBUF protobuf>=3.1)
260 # later we use:
261 # ${PROTOBUF_LIBRARIES}
262 # ${PROTOBUF_CFLAGS_OTHER}
backends/prometheus/remote_write/remote_write.cc
+1 -1
@@ -98,7 +98,7 @@ void add_metric(const char *name, const char *chart, const char *family, const c
98 }
99
100 size_t get_write_request_size(){
101 - size_t size = (size_t)snappy::MaxCompressedLength(write_request->ByteSize());
101 + size_t size = (size_t)snappy::MaxCompressedLength(write_request->ByteSizeLong());
102
103 return (size < INT_MAX)?size:0;
104 }
configure.ac
+1 -1
@@ -932,7 +932,7 @@ AM_CONDITIONAL([ENABLE_BACKEND_KINESIS], [test "${enable_backend_kinesis}" = "ye
932
933 PKG_CHECK_MODULES(
934 [PROTOBUF],
935 - [protobuf >= 3],
935 + [protobuf >= 3.1],
936 [have_libprotobuf=yes],
937 [have_libprotobuf=no]
938 )