diff --git a/BUILD.bazel b/BUILD.bazel index 138e416b10..c763cb3a2f 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -475,7 +475,7 @@ cc_library( deps = [ ":brpc_idl_options_cc_proto", ":butil", - "@com_google_protobuf//src/google/protobuf/compiler:code_generator", + "@com_google_protobuf//:protoc_lib", ], ) diff --git a/src/brpc/nonreflectable_message.h b/src/brpc/nonreflectable_message.h index 7f2acd78a3..4d704563bc 100644 --- a/src/brpc/nonreflectable_message.h +++ b/src/brpc/nonreflectable_message.h @@ -129,7 +129,7 @@ class NonreflectableMessage : public ::google::protobuf::Message { void DiscardUnknownFields() override {} #endif -#if GOOGLE_PROTOBUF_VERSION < 5026000 +#if GOOGLE_PROTOBUF_VERSION >= 3004000 && GOOGLE_PROTOBUF_VERSION < 5026000 // Unsupported by default. size_t SpaceUsedLong() const override { return 0; diff --git a/test/brpc_channel_unittest.cpp b/test/brpc_channel_unittest.cpp index 2004767470..b17fc73809 100644 --- a/test/brpc_channel_unittest.cpp +++ b/test/brpc_channel_unittest.cpp @@ -298,14 +298,10 @@ class ChannelTest : public ::testing::Test{ cntl->_current_call.sending_sock.reset(ptr.release()); cntl->_server = &ts->_dummy; - google::protobuf::Closure* done = - brpc::NewCallback< - int64_t, brpc::Controller*, - brpc::RpcPBMessages*, - const brpc::Server*, + google::protobuf::Closure* done = brpc::NewCallback< + int64_t, brpc::Controller*, brpc::RpcPBMessages*, const brpc::Server*, brpc::MethodStatus*, int64_t, std::shared_ptr>( - &brpc::policy::SendRpcResponse, - meta.correlation_id(), cntl, + &brpc::policy::SendRpcResponse, meta.correlation_id(), cntl, messages, &ts->_dummy, NULL, -1, nullptr); ts->_svc.CallMethod(method, cntl, req, res, done); }