]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUILD: wdt: only test for SI_TKILL when compiled with thread support
authorWilly Tarreau <w@1wt.eu>
Tue, 10 Mar 2020 08:26:17 +0000 (09:26 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 10 Mar 2020 08:26:17 +0000 (09:26 +0100)
SI_TKILL is not necessarily defined on older systems and is used only
with the pthread_kill() call a few lines below, so it should also be
subject to the USE_THREAD condition.

src/wdt.c

index 528685acb5f9b980f2612fbb0155b4a7323e6a7a..44b35402abbbbcb7ce5598c363dbdfbdcc12fb3d 100644 (file)
--- a/src/wdt.c
+++ b/src/wdt.c
@@ -101,12 +101,12 @@ 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
        case SI_TKILL:
                /* we got a pthread_kill, stop on it */
                thr = tid;
                break;
-
+#endif
        default:
                /* unhandled other conditions */
                return;