]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUILD: watchdog: condition it to USE_RT
authorWilly Tarreau <w@1wt.eu>
Thu, 23 May 2019 08:20:55 +0000 (10:20 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 23 May 2019 08:20:55 +0000 (10:20 +0200)
It's needed on Linux to have access to timerfd_*, and on FreeBSD this
lib is needed as well, though not enabled in our default build. We can
see later if it's OK to enable it, for now let's fix the build issues.

src/wdt.c

index 60a5fd43202cf36b32ac88aaf6e42b9957532bc5..19d36c34d2a2ca4a95dd11441c7c3f3142f2e207 100644 (file)
--- a/src/wdt.c
+++ b/src/wdt.c
@@ -25,7 +25,7 @@
  * It relies on timer_create() and timer_settime() which are only available in
  * this case.
  */
-#if defined(USE_THREAD) && (_POSIX_TIMERS > 0) && defined(_POSIX_THREAD_CPUTIME)
+#if defined(USE_THREAD) && defined(USE_RT) && (_POSIX_TIMERS > 0) && defined(_POSIX_THREAD_CPUTIME)
 
 /* We'll deliver SIGALRM when we've run out of CPU as it's not intercepted by
  * gdb by default.