Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix build when MUNIT_NO_BUFFER is defined and MUNIT_NO_FORK is not #103

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion munit.c
Original file line number Diff line number Diff line change
Expand Up @@ -1251,7 +1251,7 @@ munit_test_runner_print_color(const MunitTestRunner* runner, const char* string,
fputs(string, MUNIT_OUTPUT_FILE);
}

#if !defined(MUNIT_NO_BUFFER)
#if !defined(MUNIT_NO_BUFFER) || !defined(MUNIT_NO_FORK)
static int
munit_replace_stderr(FILE* stderr_buf) {
if (stderr_buf != NULL) {
Expand All @@ -1269,7 +1269,9 @@ munit_replace_stderr(FILE* stderr_buf) {

return -1;
}
#endif /* !defined(MUNIT_NO_BUFFER) || !defined(MUNIT_NO_FORK) */

#if !defined(MUNIT_NO_BUFFER)
static void
munit_restore_stderr(int orig_stderr) {
if (orig_stderr != -1) {
Expand Down