diff --git a/include/haproxy/compat.h b/include/haproxy/compat.h index edcbcd50e..25b15a1f0 100644 --- a/include/haproxy/compat.h +++ b/include/haproxy/compat.h @@ -23,7 +23,6 @@ #define _HAPROXY_COMPAT_H #include -#include #include /* This is needed on Linux for Netfilter includes */ #include @@ -154,11 +153,6 @@ typedef struct { } empty_t; #define F_SETPIPE_SZ (1024 + 7) #endif -/* On FreeBSD we don't have SI_TKILL but SI_LWP instead */ -#if !defined(SI_TKILL) && defined(SI_LWP) -#define SI_TKILL SI_LWP -#endif - #if defined(USE_TPROXY) && defined(USE_NETFILTER) #include #include diff --git a/src/wdt.c b/src/wdt.c index d1428a556..96db84bd9 100644 --- a/src/wdt.c +++ b/src/wdt.c @@ -104,11 +104,21 @@ void wdt_handler(int sig, siginfo_t *si, void *arg) /* No doubt now, there's no hop to recover, die loudly! */ break; -#ifdef USE_THREAD + +#if defined(USE_THREAD) && defined(SI_TKILL) /* Linux uses this */ + case SI_TKILL: /* we got a pthread_kill, stop on it */ thr = tid; break; + +#elif defined(USE_THREAD) && defined(SI_LWP) /* FreeBSD uses this */ + + case SI_LWP: + /* we got a pthread_kill, stop on it */ + thr = tid; + break; + #endif default: /* unhandled other conditions */