From 89d46494393667f617398fffac8cacfaf55be773 Mon Sep 17 00:00:00 2001 From: "Nicholas J. Kain" Date: Wed, 19 Mar 2014 06:00:45 -0400 Subject: [PATCH] options.c: Conditionalize some functions to only be compiled for ndhs, as ndhc does not use them. --- ndhc/options.c | 2 ++ ndhc/options.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/ndhc/options.c b/ndhc/options.c index 20d63ef..831f425 100644 --- a/ndhc/options.c +++ b/ndhc/options.c @@ -241,6 +241,7 @@ size_t add_option_request_list(struct dhcpmsg *packet) (char *)reqdata, sizeof reqdata); } +#ifdef NDHS_BUILD size_t add_option_domain_name(struct dhcpmsg *packet, const char *dom, size_t domlen) { @@ -256,6 +257,7 @@ void add_option_broadcast(struct dhcpmsg *packet, uint32_t bc) { add_u32_option(packet, DCODE_BROADCAST, bc); } +#endif void add_option_msgtype(struct dhcpmsg *packet, uint8_t type) { diff --git a/ndhc/options.h b/ndhc/options.h index 3223ac8..0db0384 100644 --- a/ndhc/options.h +++ b/ndhc/options.h @@ -65,10 +65,12 @@ size_t add_option_string(struct dhcpmsg *packet, uint8_t code, const char *str, size_t add_u32_option(struct dhcpmsg *packet, uint8_t code, uint32_t data); size_t add_option_request_list(struct dhcpmsg *packet); +#ifdef NDHS_BUILD size_t add_option_domain_name(struct dhcpmsg *packet, const char *dom, size_t domlen); void add_option_subnet_mask(struct dhcpmsg *packet, uint32_t subnet); void add_option_broadcast(struct dhcpmsg *packet, uint32_t bc); +#endif void add_option_msgtype(struct dhcpmsg *packet, uint8_t type); void add_option_reqip(struct dhcpmsg *packet, uint32_t ip); void add_option_serverid(struct dhcpmsg *packet, uint32_t sid);