diff --git a/tensorflow_serving/workspace.bzl b/tensorflow_serving/workspace.bzl
index 7c6ab33..1746c53 100644
--- a/tensorflow_serving/workspace.bzl
+++ b/tensorflow_serving/workspace.bzl
@@ -1,6 +1,7 @@
# TensorFlow Serving external dependencies that can be loaded in WORKSPACE
# files.
+load("@org_tensorflow//third_party:repo.bzl", "tf_http_archive")
load("@org_tensorflow//tensorflow:workspace.bzl", "tf_workspace")
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
@@ -48,3 +49,16 @@ def tf_serving_workspace():
strip_prefix = "libevent-release-2.1.8-stable",
build_file = "@//third_party/libevent:BUILD",
)
+
+ # ===== Override TF defined `grpc` to fix gettid conflict because of glibc 2.30.
+ tf_http_archive(
+ name = "grpc",
+ patch_file = str(Label("//third_party:Rename-gettid-functions.patch")),
+ sha256 = "67a6c26db56f345f7cee846e681db2c23f919eba46dd639b09462d1b6203d28c",
+ strip_prefix = "grpc-4566c2a29ebec0835643b972eb99f4306c4234a3",
+ system_build_file = str(Label("@org_tensorflow//third_party/systemlibs:grpc.BUILD")),
+ urls = [
+ ],
+ )