[Dnsmasq-discuss] [PATCH] Move parse_server outside the HAVE_DHCP ifdef

Gustavo Zacarias gustavo at zacarias.com.ar
Mon Dec 10 10:48:01 GMT 2012


Fixes build breakage when building without DHCP support.

Signed-off-by: Gustavo Zacarias <gustavo at zacarias.com.ar>
---
 src/option.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/src/option.c b/src/option.c
index c1643a1..d6e323b 100644
--- a/src/option.c
+++ b/src/option.c
@@ -641,6 +641,8 @@ static char *set_prefix(char *arg)
    return arg;
 }
 
+#endif
+
 char *parse_server(char *arg, union mysockaddr *addr, union mysockaddr *source_addr, char *interface, int *flags)
 {
   int source_port = 0, serv_port = NAMESERVER_PORT;
@@ -728,6 +730,8 @@ char *parse_server(char *arg, union mysockaddr *addr, union mysockaddr *source_a
   return NULL;
 }
 
+#ifdef HAVE_DHCP
+
 /* This is too insanely large to keep in-line in the switch */
 static int parse_dhcp_opt(char *errstr, char *arg, int flags)
 {
-- 
1.7.8.6




More information about the Dnsmasq-discuss mailing list