mirror of
http://thekelleys.org.uk/git/dnsmasq.git
synced 2026-11-06 15:51:41 +00:00
Define the fork handshake byte unconditionally.
1861a881ebmade the declaration of "a" conditional on HAVE_LINUX_NETWORK, which was right as long as the read_write() calls sat inside the same #ifdef. Since1da5cc2951the 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 after7ebe7ebb93, which gives *BSD a reason to take that path. Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
1 parent
0c177ad607
commit
b518bc425d
1 file changed
-4
@@ -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--)
|
||||
|
||||
Reference in new issue
Block a user