Rename stdout and stderr to stdout_str and stderr_str
Support building with musl libc by not reusing the stdout and
stderr names, which are macros in musl.
Bug: 190084016
Test: m USE_HOST_MUSL=true host-native
Change-Id: Ia8093f42ede166c77c04f5524d442de836bde43c
diff --git a/payload_generator/squashfs_filesystem.cc b/payload_generator/squashfs_filesystem.cc
index a41e283..16b26eb 100644
--- a/payload_generator/squashfs_filesystem.cc
+++ b/payload_generator/squashfs_filesystem.cc
@@ -76,12 +76,12 @@
// Run unsquashfs to get the system file map.
// unsquashfs -m <map-file> <squashfs-file>
vector<string> cmd = {"unsquashfs", "-m", map_file.path(), sqfs_path};
- string stdout, stderr;
+ string stdout_str, stderr_str;
int exit_code;
- if (!Subprocess::SynchronousExec(cmd, &exit_code, &stdout, &stderr) ||
+ if (!Subprocess::SynchronousExec(cmd, &exit_code, &stdout_str, &stderr_str) ||
exit_code != 0) {
LOG(ERROR) << "Failed to run `unsquashfs -m` with stdout content: "
- << stdout << " and stderr content: " << stderr;
+ << stdout_str << " and stderr content: " << stderr_str;
return false;
}
TEST_AND_RETURN_FALSE(utils::ReadFile(map_file.path(), map));
@@ -104,12 +104,12 @@
unsquash_dir.GetPath().value(),
sqfs_path,
kUpdateEngineConf};
- string stdout, stderr;
+ string stdout_str, stderr_str;
int exit_code;
- if (!Subprocess::SynchronousExec(cmd, &exit_code, &stdout, &stderr) ||
+ if (!Subprocess::SynchronousExec(cmd, &exit_code, &stdout_str, &stderr_str) ||
exit_code != 0) {
PLOG(ERROR) << "Failed to unsquashfs etc/update_engine.conf with stdout: "
- << stdout << " and stderr: " << stderr;
+ << stdout_str << " and stderr: " << stderr_str;
return false;
}