diff options
author | 2021-09-13 16:31:38 -0700 | |
---|---|---|
committer | 2021-09-14 15:12:58 -0700 | |
commit | c9a77aaf722e63f1e947caf5a28f0ad6eb029c30 (patch) | |
tree | 259283fdc137753f88935de540c4f1b27f5898a8 /libs/binder/UtilsHost.cpp | |
parent | 20f5a270658bcdff7a4cc4f9f0059c572ca123eb (diff) |
Fix frameworks/native compiling against musl
stdout is a macro in musl, don't use it as an identifier.
Bug: 190084016
Test: m USE_HOST_MUSL=true
Change-Id: I470f329573cdee607abedf0f1a6448cad2b5151e
Diffstat (limited to 'libs/binder/UtilsHost.cpp')
-rw-r--r-- | libs/binder/UtilsHost.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libs/binder/UtilsHost.cpp b/libs/binder/UtilsHost.cpp index d121ce2221..52b8f69d36 100644 --- a/libs/binder/UtilsHost.cpp +++ b/libs/binder/UtilsHost.cpp @@ -63,7 +63,7 @@ std::ostream& operator<<(std::ostream& os, const CommandResult& res) { if (res.exitCode) os << "code=" << *res.exitCode; if (res.signal) os << "signal=" << *res.signal; if (res.pid) os << ", pid=" << *res.pid; - return os << ", stdout=" << res.stdout << ", stderr=" << res.stderr; + return os << ", stdout=" << res.stdoutStr << ", stderr=" << res.stderrStr; } std::string CommandResult::toString() const { @@ -142,9 +142,9 @@ android::base::Result<CommandResult> execute(std::vector<std::string> argStringV int pollRet = poll(fds, nfds, 1000 /* ms timeout */); if (pollRet == -1) return android::base::ErrnoError() << "poll()"; - if (!handlePoll(&ret.outPipe, outPollFd, &ret.stdout)) + if (!handlePoll(&ret.outPipe, outPollFd, &ret.stdoutStr)) return android::base::ErrnoError() << "read(stdout)"; - if (!handlePoll(&ret.errPipe, errPollFd, &ret.stderr)) + if (!handlePoll(&ret.errPipe, errPollFd, &ret.stderrStr)) return android::base::ErrnoError() << "read(stderr)"; if (end && end(ret)) return ret; |