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

Conversation

tpetazzoni
Copy link

src/check_run.c defines sig_handler() under the following conditions:

#if defined(HAVE_FORK) && HAVE_FORK==1

however, it does use sig_handler under the following conditions:

#if defined(HAVE_SIGACTION) && defined(HAVE_FORK)

which breaks when HAVE_FORK is defined, but has the value HAVE_FORK=0, as is the case on noMMU platforms.

This commit fixes this by ensuring that the build conditions are aligned throughout check_run.c.

Fixes:

src/check_run.c: In function 'srunner_run_tagged': src/check_run.c:802:38: error: 'sig_handler' undeclared (first use in this function); did you mean 'sa_handler'? [...]

src/check_run.c defines sig_handler() under the following conditions:

  #if defined(HAVE_FORK) && HAVE_FORK==1

however, it does use sig_handler under the following conditions:

  #if defined(HAVE_SIGACTION) && defined(HAVE_FORK)

which breaks when HAVE_FORK is defined, but has the value HAVE_FORK=0,
as is the case on noMMU platforms.

This commit fixes this by ensuring that the build conditions are
aligned throughout check_run.c.

Fixes:

src/check_run.c: In function 'srunner_run_tagged':
src/check_run.c:802:38: error: 'sig_handler' undeclared (first use in this function); did you mean 'sa_handler'?
[...]

Signed-off-by: Thomas Petazzoni <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant