diff --git a/mediapipe/framework/deps/BUILD b/mediapipe/framework/deps/BUILD index da9835037d..2dc600ada7 100644 --- a/mediapipe/framework/deps/BUILD +++ b/mediapipe/framework/deps/BUILD @@ -135,14 +135,16 @@ cc_library( ":file_path", ":mmapped_file", ":platform_strings", - "//mediapipe/framework/formats:unique_fd", "//mediapipe/framework/port:status", "@com_google_absl//absl/base:config", "@com_google_absl//absl/cleanup", "@com_google_absl//absl/status", "@com_google_absl//absl/status:statusor", "@com_google_absl//absl/strings", - ], + ] + select({ + "//mediapipe:windows": [], + "//conditions:default": ["//mediapipe/framework/formats:unique_fd"], + }), ) cc_library( diff --git a/mediapipe/framework/deps/file_helpers.cc b/mediapipe/framework/deps/file_helpers.cc index d444b452a4..32b55fcf1f 100644 --- a/mediapipe/framework/deps/file_helpers.cc +++ b/mediapipe/framework/deps/file_helpers.cc @@ -41,7 +41,9 @@ #include "mediapipe/framework/deps/file_path.h" #include "mediapipe/framework/deps/mmapped_file.h" #include "mediapipe/framework/deps/platform_strings.h" // IWYU pragma: keep +#ifndef _WIN32 #include "mediapipe/framework/formats/unique_fd.h" +#endif // !_WIN32 #include "mediapipe/framework/port/status_macros.h" namespace mediapipe { @@ -296,7 +298,7 @@ absl::Status WindowsMMap::Close() { if (!success) { return absl::UnavailableError( absl::StrCat("Failed to close the memory mapping for file '", Path(), - "': " << FormatLastError())); + "': ", FormatLastError())); } success = CloseHandle(file_handle_); if (!success) { diff --git a/mediapipe/framework/deps/mlock_helpers.cc b/mediapipe/framework/deps/mlock_helpers.cc index cacd62e3b3..0d335f5698 100644 --- a/mediapipe/framework/deps/mlock_helpers.cc +++ b/mediapipe/framework/deps/mlock_helpers.cc @@ -4,7 +4,7 @@ #ifdef _WIN32 // clang-format off -#include // Must come before other Windows headers +#include // Must come before other Windows headers. // clang-format on #include #else