From a839ea0047cb8d87752957b69e5a005141d79f29 Mon Sep 17 00:00:00 2001 From: Yong Tang Date: Mon, 8 Feb 2021 20:04:30 -0800 Subject: [PATCH] Add @com_google_absl//absl/strings:cord Fix read/STDIN_FILENO Signed-off-by: Yong Tang --- tensorflow_io/core/kernels/text_kernels.cc | 3 ++- tensorflow_io/core/kernels/video_kernels.h | 1 + third_party/toolchains/tf/BUILD.tpl | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/tensorflow_io/core/kernels/text_kernels.cc b/tensorflow_io/core/kernels/text_kernels.cc index 119437705..dea82134f 100644 --- a/tensorflow_io/core/kernels/text_kernels.cc +++ b/tensorflow_io/core/kernels/text_kernels.cc @@ -16,10 +16,11 @@ limitations under the License. #include "tensorflow/core/framework/op_kernel.h" #include "tensorflow/core/lib/io/buffered_inputstream.h" #include "tensorflow_io/core/kernels/io_stream.h" - #if defined(_MSC_VER) #include #define STDIN_FILENO _fileno(stdin) +#else +#include #endif namespace tensorflow { diff --git a/tensorflow_io/core/kernels/video_kernels.h b/tensorflow_io/core/kernels/video_kernels.h index cddcfe594..91838dbe5 100644 --- a/tensorflow_io/core/kernels/video_kernels.h +++ b/tensorflow_io/core/kernels/video_kernels.h @@ -23,6 +23,7 @@ limitations under the License. #include #include #include +#include static int xioctl(int fh, int request, void* arg) { int r; diff --git a/third_party/toolchains/tf/BUILD.tpl b/third_party/toolchains/tf/BUILD.tpl index 85c1cad0d..425a96e15 100644 --- a/third_party/toolchains/tf/BUILD.tpl +++ b/third_party/toolchains/tf/BUILD.tpl @@ -8,6 +8,7 @@ cc_library( "@com_google_absl//absl/container:flat_hash_map", "@com_google_absl//absl/container:inlined_vector", "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:cord", "@com_google_absl//absl/types:optional", "@com_google_absl//absl/types:span", ],