From 4e7ea3638c6bf72a1a8d12b015243aca768eeb0a Mon Sep 17 00:00:00 2001 From: Collin Funk Date: Sat, 10 Oct 2026 21:44:39 -0700 Subject: [PATCH] timeout: don't fail to build with non-Linux prctl implementations Linux 2.1.57 introduced both prctl(2) and PR_SET_PDEATHSIG(2), so the condition before this patch is correct there. However, other systems have a prctl function but not PR_SET_PDEATHSIG, e.g., Irix and SerenityOS. * src/timeout.c (main): Check that PR_SET_PDEATHSIG is defined before using it. --- src/timeout.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/timeout.c b/src/timeout.c index 94d2c41cb..34a2b82c4 100644 --- a/src/timeout.c +++ b/src/timeout.c @@ -605,7 +605,7 @@ main (int argc, char **argv) } else if (monitored_pid == 0) /* child */ { -#if HAVE_PRCTL +#if HAVE_PRCTL && defined PR_SET_PDEATHSIG /* Add protection if the parent dies without signaling child. */ prctl (PR_SET_PDEATHSIG, term_signal); #endif