From b518bc425d7e6f4ced393a78332e08707ab6e8c7 Mon Sep 17 00:00:00 2001 From: DL6ER Date: Sun, 9 Aug 2026 10:34:01 +0200 Subject: [PATCH] Define the fork handshake byte unconditionally. 1861a881ebce780ed5790443ac1f0e41f4db954a made the declaration of "a" conditional on HAVE_LINUX_NETWORK, which was right as long as the read_write() calls sat inside the same #ifdef. Since 1da5cc2951d345efa2ed7206dbe86d201d9f2fe4 the parent blocks on the pipe and the child writes the byte on every platform, so a build without HAVE_LINUX_NETWORK now fails with "a undeclared" in both do_tcp_connection() and swap_to_tcp(). This is easy to hit after 7ebe7ebb93622568e196e0024cd4953e21afd186, which gives *BSD a reason to take that path. Signed-off-by: DL6ER --- src/dnsmasq.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/dnsmasq.c b/src/dnsmasq.c index c1e48fc..31f8ab2 100644 --- a/src/dnsmasq.c +++ b/src/dnsmasq.c @@ -2021,9 +2021,7 @@ static void do_tcp_connection(struct listener *listener, time_t now, int slot) struct in_addr netmask; int pipefd[2]; struct iovec tcpbuff; -#ifdef HAVE_LINUX_NETWORK unsigned char a = 0; -#endif netmask.s_addr = 0; while ((confd = accept(listener->tcpfd, NULL, NULL)) == -1 && errno == EINTR); @@ -2258,9 +2256,7 @@ int swap_to_tcp(struct frec *forward, time_t now, int status, struct dns_header { pid_t p; int i, pipefd[2]; -#ifdef HAVE_LINUX_NETWORK unsigned char a = 0; -#endif /* check to see if we have a free tcp process slot. */ for (i = daemon->max_procs - 1; i >= 0; i--)