gRPC, Windows: add missing #include and warning
Add a missing header inclusion to string_win32.c
which was resulting in an implicit function
declaration with the wrong, but compatible type,
causing a char* being converted to int, converted
to char*, corrupting the upper 32 bits, leading to
a segfault.
Fixes https://github.com/bazelbuild/bazel/issues/2672
Change-Id: I805737c93c248f792b2c0f54fe15ab9a261575d2
diff --git a/third_party/grpc/BUILD b/third_party/grpc/BUILD
index deaefd0..864d93c 100644
--- a/third_party/grpc/BUILD
+++ b/third_party/grpc/BUILD
@@ -414,7 +414,7 @@
],
copts = [
"-std=gnu99",
- "-Wno-implicit-function-declaration",
+ "-Wimplicit-function-declaration",
],
includes = [
".",
diff --git a/third_party/grpc/src/core/support/string_win32.c b/third_party/grpc/src/core/support/string_win32.c
index 3b1f702c..aedc987 100644
--- a/third_party/grpc/src/core/support/string_win32.c
+++ b/third_party/grpc/src/core/support/string_win32.c
@@ -34,6 +34,7 @@
/* Posix code for gpr snprintf support. */
#include <grpc/support/port_platform.h>
+#include <grpc/support/string_util.h>
#ifdef GPR_WIN32