libcheck / check

A unit testing framework for C
GNU Lesser General Public License v2.1
1.07k stars 209 forks source link

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

Open tpetazzoni opened 1 month ago

tpetazzoni commented 1 month ago

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'? [...]