Define the fork handshake byte unconditionally.

1861a881eb 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 1da5cc2951 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
7ebe7ebb93, which gives *BSD a reason
to take that path.

Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
DL6ER authored and Simon Kelley committed 2026-08-20 15:47:44 +01:00
1 parent 0c177ad607
commit b518bc425d
1 file changed
-4
-4
View File
@@ -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--)