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
This commit is contained in:
A. Unique TensorFlower 2020-12-14 12:53:30 -08:00 committed by TensorFlower Gardener
parent cae2f149e1
commit df96df9862

View File

@ -26,6 +26,7 @@ limitations under the License.
#include "tensorflow/tools/graph_transforms/transform_utils.h"
#if !defined(PLATFORM_WINDOWS)
#include <pwd.h>
#include <unistd.h>
#endif
namespace tensorflow {