File grpc-pr18950-bazel.patch of Package tensorflow
diff -uNr tensorflow-1.15.5/tensorflow/workspace.bzl tensorflow-1.15.5p/tensorflow/workspace.bzl
--- tensorflow-1.15.5/tensorflow/workspace.bzl 2021-01-04 21:18:42.000000000 +0100
+++ tensorflow-1.15.5p/tensorflow/workspace.bzl 2021-04-12 20:32:18.766306579 +0200
@@ -513,6 +513,7 @@
name = "grpc",
sha256 = "67a6c26db56f345f7cee846e681db2c23f919eba46dd639b09462d1b6203d28c",
strip_prefix = "grpc-4566c2a29ebec0835643b972eb99f4306c4234a3",
+ patch_file = clean_dep("//third_party/grpc:grpc-pr18950.patch"),
system_build_file = clean_dep("//third_party/systemlibs:grpc.BUILD"),
urls = [
"https://storage.googleapis.com/mirror.tensorflow.org/github.com/grpc/grpc/archive/4566c2a29ebec0835643b972eb99f4306c4234a3.tar.gz",
diff -uNr tensorflow-1.15.5/third_party/grpc/grpc-pr18950.patch tensorflow-1.15.5p/third_party/grpc/grpc-pr18950.patch
--- tensorflow-1.15.5/third_party/grpc/grpc-pr18950.patch 1970-01-01 01:00:00.000000000 +0100
+++ tensorflow-1.15.5p/third_party/grpc/grpc-pr18950.patch 2021-04-12 20:30:26.551896379 +0200
@@ -0,0 +1,63 @@
+diff -ur grpc-4566c2a29ebec0835643b972eb99f4306c4234a3/src/core/lib/gpr/log_linux.cc grpc-4566c2a29ebec0835643b972eb99f4306c4234a3.patched/src/core/lib/gpr/log_linux.cc
+--- grpc-4566c2a29ebec0835643b972eb99f4306c4234a3/src/core/lib/gpr/log_linux.cc 2019-04-03 21:06:27.000000000 +0200
++++ grpc-4566c2a29ebec0835643b972eb99f4306c4234a3.patched/src/core/lib/gpr/log_linux.cc 2021-04-12 19:56:34.036373314 +0200
+@@ -40,7 +40,7 @@
+ #include <time.h>
+ #include <unistd.h>
+
+-static long gettid(void) { return syscall(__NR_gettid); }
++static long sys_gettid(void) { return syscall(__NR_gettid); }
+
+ void gpr_log(const char* file, int line, gpr_log_severity severity,
+ const char* format, ...) {
+@@ -70,7 +70,7 @@
+ gpr_timespec now = gpr_now(GPR_CLOCK_REALTIME);
+ struct tm tm;
+ static __thread long tid = 0;
+- if (tid == 0) tid = gettid();
++ if (tid == 0) tid = sys_gettid();
+
+ timer = static_cast<time_t>(now.tv_sec);
+ final_slash = strrchr(args->file, '/');
+diff -ur grpc-4566c2a29ebec0835643b972eb99f4306c4234a3/src/core/lib/gpr/log_posix.cc grpc-4566c2a29ebec0835643b972eb99f4306c4234a3.patched/src/core/lib/gpr/log_posix.cc
+--- grpc-4566c2a29ebec0835643b972eb99f4306c4234a3/src/core/lib/gpr/log_posix.cc 2019-04-03 21:06:27.000000000 +0200
++++ grpc-4566c2a29ebec0835643b972eb99f4306c4234a3.patched/src/core/lib/gpr/log_posix.cc 2021-04-12 19:46:57.624138979 +0200
+@@ -31,7 +31,7 @@
+ #include <string.h>
+ #include <time.h>
+
+-static intptr_t gettid(void) { return (intptr_t)pthread_self(); }
++static intptr_t sys_gettid(void) { return (intptr_t)pthread_self(); }
+
+ void gpr_log(const char* file, int line, gpr_log_severity severity,
+ const char* format, ...) {
+@@ -86,7 +86,7 @@
+ char* prefix;
+ gpr_asprintf(&prefix, "%s%s.%09d %7" PRIdPTR " %s:%d]",
+ gpr_log_severity_string(args->severity), time_buffer,
+- (int)(now.tv_nsec), gettid(), display_file, args->line);
++ (int)(now.tv_nsec), sys_gettid(), display_file, args->line);
+
+ fprintf(stderr, "%-70s %s\n", prefix, args->message);
+ gpr_free(prefix);
+diff -ur grpc-4566c2a29ebec0835643b972eb99f4306c4234a3/src/core/lib/iomgr/ev_epollex_linux.cc grpc-4566c2a29ebec0835643b972eb99f4306c4234a3.patched/src/core/lib/iomgr/ev_epollex_linux.cc
+--- grpc-4566c2a29ebec0835643b972eb99f4306c4234a3/src/core/lib/iomgr/ev_epollex_linux.cc 2019-04-03 21:06:27.000000000 +0200
++++ grpc-4566c2a29ebec0835643b972eb99f4306c4234a3.patched/src/core/lib/iomgr/ev_epollex_linux.cc 2021-04-12 19:46:57.624138979 +0200
+@@ -1103,7 +1103,7 @@
+ }
+
+ #ifndef NDEBUG
+-static long gettid(void) { return syscall(__NR_gettid); }
++static long sys_gettid(void) { return syscall(__NR_gettid); }
+ #endif
+
+ /* pollset->mu lock must be held by the caller before calling this.
+@@ -1123,7 +1123,7 @@
+ #define WORKER_PTR (&worker)
+ #endif
+ #ifndef NDEBUG
+- WORKER_PTR->originator = gettid();
++ WORKER_PTR->originator = sys_gettid();
+ #endif
+ if (grpc_polling_trace.enabled()) {
+ gpr_log(GPR_INFO,