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

src/check_run.c: fix build on noMMU platforms #354

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
12 changes: 6 additions & 6 deletions src/check_run.c
Original file line number Diff line number Diff line change
Expand Up @@ -772,12 +772,12 @@ void srunner_run_tagged(SRunner * sr, const char *sname, const char *tcname,
const char *include_tags, const char *exclude_tags,
enum print_output print_mode)
{
#if defined(HAVE_SIGACTION) && defined(HAVE_FORK)
#if defined(HAVE_SIGACTION) && defined(HAVE_FORK) && HAVE_FORK==1
static struct sigaction sigalarm_old_action;
static struct sigaction sigalarm_new_action;
static struct sigaction sigint_new_action;
static struct sigaction sigterm_new_action;
#endif /* HAVE_SIGACTION && HAVE_FORK */
#endif /* HAVE_SIGACTION && HAVE_FORK && HAVE_FORK==1 */

/* Get the selected test suite and test case from the
environment. */
Expand All @@ -797,7 +797,7 @@ void srunner_run_tagged(SRunner * sr, const char *sname, const char *tcname,
eprintf("Bad print_mode argument to srunner_run_all: %d",
__FILE__, __LINE__, print_mode);
}
#if defined(HAVE_SIGACTION) && defined(HAVE_FORK)
#if defined(HAVE_SIGACTION) && defined(HAVE_FORK) && HAVE_FORK==1
memset(&sigalarm_new_action, 0, sizeof(sigalarm_new_action));
sigalarm_new_action.sa_handler = sig_handler;
sigaction(SIGALRM, &sigalarm_new_action, &sigalarm_old_action);
Expand All @@ -809,16 +809,16 @@ void srunner_run_tagged(SRunner * sr, const char *sname, const char *tcname,
memset(&sigterm_new_action, 0, sizeof(sigterm_new_action));
sigterm_new_action.sa_handler = sig_handler;
sigaction(SIGTERM, &sigterm_new_action, &sigterm_old_action);
#endif /* HAVE_SIGACTION && HAVE_FORK */
#endif /* HAVE_SIGACTION && HAVE_FORK && HAVE_FORK==1 */
srunner_run_init(sr, print_mode);
srunner_iterate_suites(sr, sname, tcname, include_tags, exclude_tags,
print_mode);
srunner_run_end(sr, print_mode);
#if defined(HAVE_SIGACTION) && defined(HAVE_FORK)
#if defined(HAVE_SIGACTION) && defined(HAVE_FORK) && HAVE_FORK==1
sigaction(SIGALRM, &sigalarm_old_action, NULL);
sigaction(SIGINT, &sigint_old_action, NULL);
sigaction(SIGTERM, &sigterm_old_action, NULL);
#endif /* HAVE_SIGACTION && HAVE_FORK */
#endif /* HAVE_SIGACTION && HAVE_FORK && HAVE_FORK==1 */
}

void srunner_run(SRunner * sr, const char *sname, const char *tcname,
Expand Down