From df96df98624b3973d45bebd5ed7297469a5addb4 Mon Sep 17 00:00:00 2001 From: "A. Unique TensorFlower" Date: Mon, 14 Dec 2020 12:53:30 -0800 Subject: [PATCH] Add unistd.h required for getuid(). Without this, we get the following build failure: ``` tensorflow/tools/graph_transforms/transform_graph.cc: In function 'std::__cxx11::string tensorflow::graph_transforms::ExpandPath(const string&)': tensorflow/tools/graph_transforms/transform_graph.cc:150:36: error: 'getuid' was not declared in this scope struct passwd* pw = getpwuid(getuid()); ^~~~~~ tensorflow/tools/graph_transforms/transform_graph.cc:150:36: note: suggested alternative: 'getpwuid' struct passwd* pw = getpwuid(getuid()); ^~~~~~ getpwuid ``` PiperOrigin-RevId: 347448636 Change-Id: I7ef9efaa2edb5dbb88529e6c76357ec0057b87ea --- tensorflow/tools/graph_transforms/transform_graph.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/tensorflow/tools/graph_transforms/transform_graph.cc b/tensorflow/tools/graph_transforms/transform_graph.cc index 5b9fa84cc15..a004d7f789b 100644 --- a/tensorflow/tools/graph_transforms/transform_graph.cc +++ b/tensorflow/tools/graph_transforms/transform_graph.cc @@ -26,6 +26,7 @@ limitations under the License. #include "tensorflow/tools/graph_transforms/transform_utils.h" #if !defined(PLATFORM_WINDOWS) #include +#include #endif namespace tensorflow {