From 3f36f5e316bd8686e8f6050baf1168078a34bb86 Mon Sep 17 00:00:00 2001
From: "Nicolas \"Pixel\" Noble" <pixel@nobis-crew.org>
Date: Fri, 6 Feb 2015 20:45:54 +0100
Subject: [PATCH] Few minor fixes.

Fixing a few issues in case you *cough* have a different local implementation of
protobuf, gtest and gflags for some weird reason.
---
 examples/tips/publisher_test.cc  |  2 ++
 examples/tips/subscriber_test.cc |  2 ++
 test/cpp/interop/client.cc       | 10 +++++-----
 3 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/examples/tips/publisher_test.cc b/examples/tips/publisher_test.cc
index e46576a2f6..34737ae6ed 100644
--- a/examples/tips/publisher_test.cc
+++ b/examples/tips/publisher_test.cc
@@ -31,6 +31,8 @@
  *
  */
 
+#include <google/protobuf/stubs/common.h>
+
 #include <grpc++/channel_arguments.h>
 #include <grpc++/channel_interface.h>
 #include <grpc++/client_context.h>
diff --git a/examples/tips/subscriber_test.cc b/examples/tips/subscriber_test.cc
index 595a6a13a1..fda8909a02 100644
--- a/examples/tips/subscriber_test.cc
+++ b/examples/tips/subscriber_test.cc
@@ -31,6 +31,8 @@
  *
  */
 
+#include <google/protobuf/stubs/common.h>
+
 #include <grpc++/channel_arguments.h>
 #include <grpc++/channel_interface.h>
 #include <grpc++/client_context.h>
diff --git a/test/cpp/interop/client.cc b/test/cpp/interop/client.cc
index a0662fd05f..0fa76f0e02 100644
--- a/test/cpp/interop/client.cc
+++ b/test/cpp/interop/client.cc
@@ -191,10 +191,10 @@ void DoComputeEngineCreds() {
   gpr_log(GPR_INFO, "Got username %s", response.username().c_str());
   gpr_log(GPR_INFO, "Got oauth_scope %s", response.oauth_scope().c_str());
   GPR_ASSERT(!response.username().empty());
-  GPR_ASSERT(response.username() == FLAGS_default_service_account);
+  GPR_ASSERT(response.username().c_str() == FLAGS_default_service_account);
   GPR_ASSERT(!response.oauth_scope().empty());
-  GPR_ASSERT(
-      FLAGS_oauth_scope.find(response.oauth_scope()) != grpc::string::npos);
+  const char *oauth_scope_str = response.oauth_scope().c_str();
+  GPR_ASSERT(FLAGS_oauth_scope.find(oauth_scope_str) != grpc::string::npos);
   gpr_log(GPR_INFO, "Large unary with compute engine creds done.");
 }
 
@@ -212,8 +212,8 @@ void DoServiceAccountCreds() {
   GPR_ASSERT(!response.oauth_scope().empty());
   grpc::string json_key = GetServiceAccountJsonKey();
   GPR_ASSERT(json_key.find(response.username()) != grpc::string::npos);
-  GPR_ASSERT(FLAGS_oauth_scope.find(response.oauth_scope()) !=
-             grpc::string::npos);
+  const char *oauth_scope_str = response.oauth_scope().c_str();
+  GPR_ASSERT(FLAGS_oauth_scope.find(oauth_scope_str) != grpc::string::npos);
   gpr_log(GPR_INFO, "Large unary with service account creds done.");
 }
 
-- 
GitLab