aboutsummaryrefslogtreecommitdiff
path: root/src/libutil
diff options
context:
space:
mode:
authorQyriad <qyriad@qyriad.me>2024-07-21 13:15:30 -0600
committerQyriad <qyriad@qyriad.me>2024-07-24 17:21:40 +0000
commit8d12e0fbb7306cbc58b12ef051d7067d703738de (patch)
treedaa5aecbda8ff9227039cac279f8635f12cb470e /src/libutil
parent53f3e39815c3357c6465963359e94a6318b54af7 (diff)
fix building with Musl, fixing static builds
Musl stdout macro expands¹ to something that isn't a valid identifier, so we get syntax errors when compiling usage of a method called stdout with Musl's stdio.h. [1]: https://git.musl-libc.org/cgit/musl/tree/include/stdio.h?id=ab31e9d6a0fa7c5c408856c89df2dfb12c344039#n67 Change-Id: I10e6f6a49504399bf8edd59c5d9e4e62449469e8
Diffstat (limited to 'src/libutil')
-rw-r--r--src/libutil/processes.cc2
-rw-r--r--src/libutil/processes.hh2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/libutil/processes.cc b/src/libutil/processes.cc
index 4fe3dcfb4..05b1321e9 100644
--- a/src/libutil/processes.cc
+++ b/src/libutil/processes.cc
@@ -251,7 +251,7 @@ std::pair<int, std::string> runProgram(RunOptions && options)
try {
auto proc = runProgram2(options);
Finally const _wait([&] { proc.wait(); });
- stdout = proc.stdout()->drain();
+ stdout = proc.getStdout()->drain();
} catch (ExecError & e) {
status = e.status;
}
diff --git a/src/libutil/processes.hh b/src/libutil/processes.hh
index f61b9696d..dc09a9ba4 100644
--- a/src/libutil/processes.hh
+++ b/src/libutil/processes.hh
@@ -106,7 +106,7 @@ public:
void wait();
- Source * stdout() const { return stdoutSource.get(); }
+ Source * getStdout() const { return stdoutSource.get(); };
};
std::pair<int, std::string> runProgram(RunOptions && options);