From df9d9ea15958a4751c3be539d185f42ea8302dfe Mon Sep 17 00:00:00 2001 From: Mihai Maruseac Date: Mon, 25 Nov 2019 11:19:11 -0800 Subject: [PATCH] Only use sendfile implementation on linux. That is, use copy_file_linux.cc only if we are on linux. This fixes a bug where BSD sendfile is not the same as Linux sendfile so Mac builds fail. PiperOrigin-RevId: 282396307 Change-Id: I202ab4e0e33d4e0c45296f7b693953aac8cf4fb0 --- tensorflow/c/experimental/filesystem/plugins/posix/BUILD | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tensorflow/c/experimental/filesystem/plugins/posix/BUILD b/tensorflow/c/experimental/filesystem/plugins/posix/BUILD index 628e4bdb3cc..8bb04fa7c78 100644 --- a/tensorflow/c/experimental/filesystem/plugins/posix/BUILD +++ b/tensorflow/c/experimental/filesystem/plugins/posix/BUILD @@ -25,8 +25,8 @@ cc_library( "posix_filesystem_helper.h", "copy_file.h", ] + select({ - "//tensorflow:android": ["copy_file_portable.cc"], - "//conditions:default": ["copy_file_linux.cc"], + "//tensorflow:linux_x86_64": ["copy_file_linux.cc"], + "//conditions:default": ["copy_file_portable.cc"], }), deps = [ "//tensorflow/c:tf_status",