diff --git a/examples/tips/publisher_test.cc b/examples/tips/publisher_test.cc
index e46576a2f6c34be1f32ec32d14430719b9b1f41c..34737ae6ed9d582317f488e97b58b9db2e6cded2 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 595a6a13a13a663ddf20c5d4be087139a4b55375..fda8909a0258042a90a1df3c33ec28c0043048f3 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 a0662fd05f34c9869b2c21c2610d0e19926757be..0fa76f0e023261ce859c3b96428ddeda1175946a 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.");
 }