Replace pipe2() by pipe() and fnctl()
pipe2() does not exists on Darwin.
--
MOS_MIGRATED_REVID=102544058
diff --git a/src/test/cpp/blaze_util_test.cc b/src/test/cpp/blaze_util_test.cc
index baf9645..4434736 100644
--- a/src/test/cpp/blaze_util_test.cc
+++ b/src/test/cpp/blaze_util_test.cc
@@ -65,7 +65,11 @@
static int WriteFileDescriptor2(string input1, string input2) {
// create a fd for the input string
int fds[2];
- if (pipe2(fds, O_NONBLOCK) == -1) {
+ if (pipe(fds) == -1) {
+ return -1;
+ }
+ if (fcntl(fds[0], F_SETFL, O_NONBLOCK) == -1
+ || fcntl(fds[1], F_SETFL, O_NONBLOCK) == -1) {
return -1;
}
if (input2.size() > 0) {