From 99f61f65f4b36a95b8a809d571fa527422fb082d Mon Sep 17 00:00:00 2001 From: Lars Erik Wik Date: Mon, 13 Jul 2026 16:33:59 +0200 Subject: [PATCH 1/2] Fixed cf-watchd build by using CF3_CFLAGS @CFLAGS@ omitted -std=gnu99, causing C99 for-loop errors. Ticket: ENT-14193 Signed-off-by: Lars Erik Wik --- cf-watchd/Makefile.am | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cf-watchd/Makefile.am b/cf-watchd/Makefile.am index 43c2398aac..beddc62f73 100644 --- a/cf-watchd/Makefile.am +++ b/cf-watchd/Makefile.am @@ -30,7 +30,8 @@ AM_CPPFLAGS = -I$(srcdir)/../libpromises -I$(srcdir)/../libntech/libutils \ $(PCRE2_CPPFLAGS) \ $(ENTERPRISE_CPPFLAGS) -AM_CFLAGS = @CFLAGS@ \ +AM_CFLAGS = $(CF3_CFLAGS) \ + $(DEBUG_CFLAGS) \ $(OPENSSL_CFLAGS) \ $(ENTERPRISE_CFLAGS) From bb164ef01c17cc8b56395f09395c543eead95a35 Mon Sep 17 00:00:00 2001 From: Lars Erik Wik Date: Mon, 13 Jul 2026 17:24:34 +0200 Subject: [PATCH 2/2] Guarded cf-watchd instance check behind !__MINGW32__ kill() is not available on Windows, so the check failed to compile under -Werror=implicit-function-declaration. Matches cf-execd. Ticket: ENT-14193 Signed-off-by: Lars Erik Wik --- cf-watchd/cf-watchd.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cf-watchd/cf-watchd.c b/cf-watchd/cf-watchd.c index cb1e519081..01cb0d9d44 100644 --- a/cf-watchd/cf-watchd.c +++ b/cf-watchd/cf-watchd.c @@ -84,12 +84,14 @@ int main(int argc, char **argv) EvalContext *ctx = EvalContextNew(); GenericAgentConfigApply(ctx, config); +#ifndef __MINGW32__ pid_t existing_pid = ReadPID("cf-watchd.pid"); if ((existing_pid != -1) && (kill(existing_pid, 0) == 0)) { Log(LOG_LEVEL_ERR, "Another instance of cf-watchd is already running, terminating"); return 1; } +#endif #ifdef __MINGW32__