From: Willy Tarreau Date: Thu, 23 May 2019 06:36:29 +0000 (+0200) Subject: BUILD: watchdog: use si_value.sival_int, not si_int for the timer's value X-Git-Tag: v2.0-dev5~92 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=02255b24df4406d84be418c10aa5b4f94e10d8a9;p=thirdparty%2Fhaproxy.git BUILD: watchdog: use si_value.sival_int, not si_int for the timer's value Bah, the linux manpage suggests to use si_int but it's a fake, it's only a define on sigval.sival_int where sigval is defined as si_value. Let's use si_value.sival_int, at least it builds on both Linux and FreeBSD. It's likely that this code will have to be limited to a small subset of OSes if it causes difficulties like this. --- diff --git a/src/wdt.c b/src/wdt.c index 45438d6b5b..60a5fd4320 100644 --- a/src/wdt.c +++ b/src/wdt.c @@ -60,7 +60,7 @@ void wdt_handler(int sig, siginfo_t *si, void *arg) * the thread number from there. Note: this thread might * continue to execute in parallel. */ - thr = si->si_int; + thr = si->si_value.sival_int; /* cannot happen unless an unknown timer tries to play with our * nerves. Let's die for now if this happens.