From c534b0d121f41b8ad70896d5f5f2b2e56509e441 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Tue, 28 Jun 2016 11:48:05 -0700 Subject: [PATCH] make gcc 4.4 happy --- test/cpp/grpclb/grpclb_test.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/cpp/grpclb/grpclb_test.cc b/test/cpp/grpclb/grpclb_test.cc index 3e9949649bd..d67cbac8826 100644 --- a/test/cpp/grpclb/grpclb_test.cc +++ b/test/cpp/grpclb/grpclb_test.cc @@ -124,7 +124,11 @@ static gpr_slice build_response_payload_slice( auto *server = serverlist->add_servers(); server->set_ip_address(host); server->set_port(ports[i]); - server->set_load_balance_token("token" + std::to_string(ports[i])); + // The following long long int cast is meant to work around the + // disfunctional implementation of std::to_string in gcc 4.4, which doesn't + // have a version for int but does have one for long long int. + server->set_load_balance_token("token" + + std::to_string((long long int)ports[i])); } gpr_log(GPR_INFO, "generating response: %s",