From c9a77aaf722e63f1e947caf5a28f0ad6eb029c30 Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Mon, 13 Sep 2021 16:31:38 -0700 Subject: 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 --- libs/binder/ServiceManagerHost.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'libs/binder/ServiceManagerHost.cpp') diff --git a/libs/binder/ServiceManagerHost.cpp b/libs/binder/ServiceManagerHost.cpp index 59334b7542..27cc563adc 100644 --- a/libs/binder/ServiceManagerHost.cpp +++ b/libs/binder/ServiceManagerHost.cpp @@ -74,12 +74,12 @@ std::optional AdbForwarder::forward(unsigned int devicePort) { result->toString().c_str()); return std::nullopt; } - if (!result->stderr.empty()) { + if (!result->stderrStr.empty()) { LOG_HOST("`adb forward tcp:0 tcp:%d` writes to stderr: %s", devicePort, - result->stderr.c_str()); + result->stderrStr.c_str()); } - unsigned int hostPort = parsePortNumber(result->stdout, "host port"); + unsigned int hostPort = parsePortNumber(result->stdoutStr, "host port"); if (hostPort == 0) return std::nullopt; return AdbForwarder(hostPort); @@ -105,9 +105,9 @@ AdbForwarder::~AdbForwarder() { result->toString().c_str()); return; } - if (!result->stderr.empty()) { + if (!result->stderrStr.empty()) { LOG_HOST("`adb forward --remove tcp:%d` writes to stderr: %s", *mPort, - result->stderr.c_str()); + result->stderrStr.c_str()); } LOG_HOST("Successfully run `adb forward --remove tcp:%d`", *mPort); @@ -139,8 +139,8 @@ sp getDeviceService(std::vector&& serviceDispatcherArgs) { ALOGE("Command exits with: %s", result->toString().c_str()); return nullptr; } - if (!result->stderr.empty()) { - LOG_HOST("servicedispatcher writes to stderr: %s", result->stderr.c_str()); + if (!result->stderrStr.empty()) { + LOG_HOST("servicedispatcher writes to stderr: %s", result->stderrStr.c_str()); } if (!result->stdoutEndsWithNewLine()) { @@ -148,7 +148,7 @@ sp getDeviceService(std::vector&& serviceDispatcherArgs) { return nullptr; } - unsigned int devicePort = parsePortNumber(result->stdout, "device port"); + unsigned int devicePort = parsePortNumber(result->stdoutStr, "device port"); if (devicePort == 0) return nullptr; auto forwardResult = AdbForwarder::forward(devicePort); -- cgit v1.2.3-59-g8ed1b