diff options
-rw-r--r-- | adb/adb_unique_fd.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/adb/adb_unique_fd.h b/adb/adb_unique_fd.h index 9c02cbeec..0dd86872d 100644 --- a/adb/adb_unique_fd.h +++ b/adb/adb_unique_fd.h | |||
@@ -28,9 +28,9 @@ struct AdbCloser { | |||
28 | using unique_fd = android::base::unique_fd_impl<AdbCloser>; | 28 | using unique_fd = android::base::unique_fd_impl<AdbCloser>; |
29 | 29 | ||
30 | #if !defined(_WIN32) | 30 | #if !defined(_WIN32) |
31 | inline bool Pipe(unique_fd* read, unique_fd* write) { | 31 | inline bool Pipe(unique_fd* read, unique_fd* write, int flags = 0) { |
32 | int pipefd[2]; | 32 | int pipefd[2]; |
33 | if (pipe(pipefd) != 0) { | 33 | if (pipe2(pipefd, flags) != 0) { |
34 | return false; | 34 | return false; |
35 | } | 35 | } |
36 | read->reset(pipefd[0]); | 36 | read->reset(pipefd[0]); |