Eliminate some warnings

This commit is contained in:
Gregory Nutt 2015-09-08 09:20:49 -06:00
parent f52a228eef
commit f10f2de2e4
6 changed files with 83 additions and 83 deletions

View File

@ -93,27 +93,27 @@
# error "Only CONFIG_NX_NPLANES==1 supported" # error "Only CONFIG_NX_NPLANES==1 supported"
#endif #endif
#ifndef CONFIG_EXAMPLES_NXCON_VPLANE #ifndef CONFIG_EXAMPLES_NXTERM_VPLANE
# define CONFIG_EXAMPLES_NXCON_VPLANE 0 # define CONFIG_EXAMPLES_NXTERM_VPLANE 0
#endif #endif
/* Pixel depth. If none provided, pick the smallest enabled pixel depth */ /* Pixel depth. If none provided, pick the smallest enabled pixel depth */
#ifndef CONFIG_EXAMPLES_NXCON_BPP #ifndef CONFIG_EXAMPLES_NXTERM_BPP
# if !defined(CONFIG_NX_DISABLE_1BPP) # if !defined(CONFIG_NX_DISABLE_1BPP)
# define CONFIG_EXAMPLES_NXCON_BPP 1 # define CONFIG_EXAMPLES_NXTERM_BPP 1
# elif !defined(CONFIG_NX_DISABLE_2BPP) # elif !defined(CONFIG_NX_DISABLE_2BPP)
# define CONFIG_EXAMPLES_NXCON_BPP 2 # define CONFIG_EXAMPLES_NXTERM_BPP 2
# elif !defined(CONFIG_NX_DISABLE_4BPP) # elif !defined(CONFIG_NX_DISABLE_4BPP)
# define CONFIG_EXAMPLES_NXCON_BPP 4 # define CONFIG_EXAMPLES_NXTERM_BPP 4
# elif !defined(CONFIG_NX_DISABLE_8BPP) # elif !defined(CONFIG_NX_DISABLE_8BPP)
# define CONFIG_EXAMPLES_NXCON_BPP 8 # define CONFIG_EXAMPLES_NXTERM_BPP 8
# elif !defined(CONFIG_NX_DISABLE_16BPP) # elif !defined(CONFIG_NX_DISABLE_16BPP)
# define CONFIG_EXAMPLES_NXCON_BPP 16 # define CONFIG_EXAMPLES_NXTERM_BPP 16
//#elif !defined(CONFIG_NX_DISABLE_24BPP) //#elif !defined(CONFIG_NX_DISABLE_24BPP)
//# define CONFIG_NXTERM_BPP 24 //# define CONFIG_NXTERM_BPP 24
# elif !defined(CONFIG_NX_DISABLE_32BPP) # elif !defined(CONFIG_NX_DISABLE_32BPP)
# define CONFIG_EXAMPLES_NXCON_BPP 32 # define CONFIG_EXAMPLES_NXTERM_BPP 32
# else # else
# error "No pixel depth provided" # error "No pixel depth provided"
# endif # endif
@ -121,62 +121,62 @@
/* Background color (default is darker royal blue) */ /* Background color (default is darker royal blue) */
#ifndef CONFIG_EXAMPLES_NXCON_BGCOLOR #ifndef CONFIG_EXAMPLES_NXTERM_BGCOLOR
# if CONFIG_EXAMPLES_NXCON_BPP == 24 || CONFIG_EXAMPLES_NXCON_BPP == 32 # if CONFIG_EXAMPLES_NXTERM_BPP == 24 || CONFIG_EXAMPLES_NXTERM_BPP == 32
# define CONFIG_EXAMPLES_NXCON_BGCOLOR RGBTO24(39, 64, 139) # define CONFIG_EXAMPLES_NXTERM_BGCOLOR RGBTO24(39, 64, 139)
# elif CONFIG_EXAMPLES_NXCON_BPP == 16 # elif CONFIG_EXAMPLES_NXTERM_BPP == 16
# define CONFIG_EXAMPLES_NXCON_BGCOLOR RGBTO16(39, 64, 139) # define CONFIG_EXAMPLES_NXTERM_BGCOLOR RGBTO16(39, 64, 139)
# else # else
# define CONFIG_EXAMPLES_NXCON_BGCOLOR RGBTO8(39, 64, 139) # define CONFIG_EXAMPLES_NXTERM_BGCOLOR RGBTO8(39, 64, 139)
# endif # endif
#endif #endif
/* Window color (lighter steel blue) */ /* Window color (lighter steel blue) */
#ifndef CONFIG_EXAMPLES_NXCON_WCOLOR #ifndef CONFIG_EXAMPLES_NXTERM_WCOLOR
# if CONFIG_EXAMPLES_NXCON_BPP == 24 || CONFIG_EXAMPLES_NXCON_BPP == 32 # if CONFIG_EXAMPLES_NXTERM_BPP == 24 || CONFIG_EXAMPLES_NXTERM_BPP == 32
# define CONFIG_EXAMPLES_NXCON_WCOLOR RGBTO24(202, 225, 255) # define CONFIG_EXAMPLES_NXTERM_WCOLOR RGBTO24(202, 225, 255)
# elif CONFIG_EXAMPLES_NXCON_BPP == 16 # elif CONFIG_EXAMPLES_NXTERM_BPP == 16
# define CONFIG_EXAMPLES_NXCON_WCOLOR RGBTO16(202, 225, 255) # define CONFIG_EXAMPLES_NXTERM_WCOLOR RGBTO16(202, 225, 255)
# else # else
# define CONFIG_EXAMPLES_NXCON_WCOLOR RGBTO8(202, 225, 255) # define CONFIG_EXAMPLES_NXTERM_WCOLOR RGBTO8(202, 225, 255)
# endif # endif
#endif #endif
/* Toolbar color (medium grey) */ /* Toolbar color (medium grey) */
#ifndef CONFIG_EXAMPLES_NXCON_TBCOLOR #ifndef CONFIG_EXAMPLES_NXTERM_TBCOLOR
# if CONFIG_EXAMPLES_NX_BPP == 24 || CONFIG_EXAMPLES_NX_BPP == 32 # if CONFIG_EXAMPLES_NX_BPP == 24 || CONFIG_EXAMPLES_NX_BPP == 32
# define CONFIG_EXAMPLES_NXCON_TBCOLOR RGBTO24(188, 188, 188) # define CONFIG_EXAMPLES_NXTERM_TBCOLOR RGBTO24(188, 188, 188)
# elif CONFIG_EXAMPLES_NX_BPP == 16 # elif CONFIG_EXAMPLES_NX_BPP == 16
# define CONFIG_EXAMPLES_NXCON_TBCOLOR RGBTO16(188, 188, 188) # define CONFIG_EXAMPLES_NXTERM_TBCOLOR RGBTO16(188, 188, 188)
# else # else
# define CONFIG_EXAMPLES_NXCON_TBCOLOR RGBTO8(188, 188, 188) # define CONFIG_EXAMPLES_NXTERM_TBCOLOR RGBTO8(188, 188, 188)
# endif # endif
#endif #endif
/* Font ID */ /* Font ID */
#ifndef CONFIG_EXAMPLES_NXCON_FONTID #ifndef CONFIG_EXAMPLES_NXTERM_FONTID
# define CONFIG_EXAMPLES_NXCON_FONTID NXFONT_DEFAULT # define CONFIG_EXAMPLES_NXTERM_FONTID NXFONT_DEFAULT
#endif #endif
/* Font color */ /* Font color */
#ifndef CONFIG_EXAMPLES_NXCON_FONTCOLOR #ifndef CONFIG_EXAMPLES_NXTERM_FONTCOLOR
# if CONFIG_EXAMPLES_NXCON_BPP == 24 || CONFIG_EXAMPLES_NXCON_BPP == 32 # if CONFIG_EXAMPLES_NXTERM_BPP == 24 || CONFIG_EXAMPLES_NXTERM_BPP == 32
# define CONFIG_EXAMPLES_NXCON_FONTCOLOR RGBTO24(0, 0, 0) # define CONFIG_EXAMPLES_NXTERM_FONTCOLOR RGBTO24(0, 0, 0)
# elif CONFIG_EXAMPLES_NXCON_BPP == 16 # elif CONFIG_EXAMPLES_NXTERM_BPP == 16
# define CONFIG_EXAMPLES_NXCON_FONTCOLOR RGBTO16(0, 0, 0) # define CONFIG_EXAMPLES_NXTERM_FONTCOLOR RGBTO16(0, 0, 0)
# else # else
# define CONFIG_EXAMPLES_NXCON_FONTCOLOR RGBTO8(0, 0, 0) # define CONFIG_EXAMPLES_NXTERM_FONTCOLOR RGBTO8(0, 0, 0)
# endif # endif
#endif #endif
/* Height of the toolbar */ /* Height of the toolbar */
#ifndef CONFIG_EXAMPLES_NXCON_TOOLBAR_HEIGHT #ifndef CONFIG_EXAMPLES_NXTERM_TOOLBAR_HEIGHT
# define CONFIG_EXAMPLES_NXCON_TOOLBAR_HEIGHT 16 # define CONFIG_EXAMPLES_NXTERM_TOOLBAR_HEIGHT 16
#endif #endif
/* Multi-user NX support */ /* Multi-user NX support */
@ -193,36 +193,36 @@
#ifndef CONFIG_NX_BLOCKING #ifndef CONFIG_NX_BLOCKING
# error "This example depends on CONFIG_NX_BLOCKING" # error "This example depends on CONFIG_NX_BLOCKING"
#endif #endif
#ifndef CONFIG_EXAMPLES_NXCON_STACKSIZE #ifndef CONFIG_EXAMPLES_NXTERM_STACKSIZE
# define CONFIG_EXAMPLES_NXCON_STACKSIZE 2048 # define CONFIG_EXAMPLES_NXTERM_STACKSIZE 2048
#endif #endif
#ifndef CONFIG_EXAMPLES_NXCON_LISTENERPRIO #ifndef CONFIG_EXAMPLES_NXTERM_LISTENERPRIO
# define CONFIG_EXAMPLES_NXCON_LISTENERPRIO 100 # define CONFIG_EXAMPLES_NXTERM_LISTENERPRIO 100
#endif #endif
#ifndef CONFIG_EXAMPLES_NXCON_CLIENTPRIO #ifndef CONFIG_EXAMPLES_NXTERM_CLIENTPRIO
# define CONFIG_EXAMPLES_NXCON_CLIENTPRIO 100 # define CONFIG_EXAMPLES_NXTERM_CLIENTPRIO 100
#endif #endif
#ifndef CONFIG_EXAMPLES_NXCON_SERVERPRIO #ifndef CONFIG_EXAMPLES_NXTERM_SERVERPRIO
# define CONFIG_EXAMPLES_NXCON_SERVERPRIO 120 # define CONFIG_EXAMPLES_NXTERM_SERVERPRIO 120
#endif #endif
#ifndef CONFIG_EXAMPLES_NXCON_NOTIFYSIGNO #ifndef CONFIG_EXAMPLES_NXTERM_NOTIFYSIGNO
# define CONFIG_EXAMPLES_NXCON_NOTIFYSIGNO 4 # define CONFIG_EXAMPLES_NXTERM_NOTIFYSIGNO 4
#endif #endif
/* Graphics Device */ /* Graphics Device */
#ifndef CONFIG_EXAMPLES_NXCON_DEVNO #ifndef CONFIG_EXAMPLES_NXTERM_DEVNO
# define CONFIG_EXAMPLES_NXCON_DEVNO 0 # define CONFIG_EXAMPLES_NXTERM_DEVNO 0
#endif #endif
/* NX Console Device */ /* NX Console Device */
#ifndef CONFIG_EXAMPLES_NXCON_MINOR #ifndef CONFIG_EXAMPLES_NXTERM_MINOR
# define CONFIG_EXAMPLES_NXCON_MINOR 0 # define CONFIG_EXAMPLES_NXTERM_MINOR 0
#endif #endif
#ifndef CONFIG_EXAMPLES_NXCON_DEVNAME #ifndef CONFIG_EXAMPLES_NXTERM_DEVNAME
# define CONFIG_EXAMPLES_NXCON_DEVNAME "/dev/nxterm0" # define CONFIG_EXAMPLES_NXTERM_DEVNAME "/dev/nxterm0"
#endif #endif
/* NxTerm task */ /* NxTerm task */

View File

@ -110,7 +110,7 @@ static int nxterm_initialize(void)
/* Set the client task priority */ /* Set the client task priority */
param.sched_priority = CONFIG_EXAMPLES_NXCON_CLIENTPRIO; param.sched_priority = CONFIG_EXAMPLES_NXTERM_CLIENTPRIO;
ret = sched_setparam(0, &param); ret = sched_setparam(0, &param);
if (ret < 0) if (ret < 0)
{ {
@ -121,8 +121,8 @@ static int nxterm_initialize(void)
/* Start the server task */ /* Start the server task */
printf("nxterm_initialize: Starting nxterm_server task\n"); printf("nxterm_initialize: Starting nxterm_server task\n");
servrid = task_create("NX Server", CONFIG_EXAMPLES_NXCON_SERVERPRIO, servrid = task_create("NX Server", CONFIG_EXAMPLES_NXTERM_SERVERPRIO,
CONFIG_EXAMPLES_NXCON_STACKSIZE, nxterm_server, NULL); CONFIG_EXAMPLES_NXTERM_STACKSIZE, nxterm_server, NULL);
if (servrid < 0) if (servrid < 0)
{ {
printf("nxterm_initialize: Failed to create nxterm_server task: %d\n", errno); printf("nxterm_initialize: Failed to create nxterm_server task: %d\n", errno);
@ -146,9 +146,9 @@ static int nxterm_initialize(void)
*/ */
(void)pthread_attr_init(&attr); (void)pthread_attr_init(&attr);
param.sched_priority = CONFIG_EXAMPLES_NXCON_LISTENERPRIO; param.sched_priority = CONFIG_EXAMPLES_NXTERM_LISTENERPRIO;
(void)pthread_attr_setschedparam(&attr, &param); (void)pthread_attr_setschedparam(&attr, &param);
(void)pthread_attr_setstacksize(&attr, CONFIG_EXAMPLES_NXCON_STACKSIZE); (void)pthread_attr_setstacksize(&attr, CONFIG_EXAMPLES_NXTERM_STACKSIZE);
ret = pthread_create(&thread, &attr, nxterm_listener, NULL); ret = pthread_create(&thread, &attr, nxterm_listener, NULL);
if (ret != 0) if (ret != 0)
@ -267,8 +267,8 @@ int nxterm_main(int argc, char **argv)
/* Set the background to the configured background color */ /* Set the background to the configured background color */
printf("nxterm_main: Set background color=%d\n", CONFIG_EXAMPLES_NXCON_BGCOLOR); printf("nxterm_main: Set background color=%d\n", CONFIG_EXAMPLES_NXTERM_BGCOLOR);
color = CONFIG_EXAMPLES_NXCON_BGCOLOR; color = CONFIG_EXAMPLES_NXTERM_BGCOLOR;
ret = nx_setbgcolor(g_nxterm_vars.hnx, &color); ret = nx_setbgcolor(g_nxterm_vars.hnx, &color);
if (ret < 0) if (ret < 0)
{ {
@ -333,7 +333,7 @@ int nxterm_main(int argc, char **argv)
/* Open the toolbar */ /* Open the toolbar */
printf("nxterm_main: Add toolbar to window\n"); printf("nxterm_main: Add toolbar to window\n");
ret = nxtk_opentoolbar(g_nxterm_vars.hwnd, CONFIG_EXAMPLES_NXCON_TOOLBAR_HEIGHT, &g_nxtoolcb, NULL); ret = nxtk_opentoolbar(g_nxterm_vars.hwnd, CONFIG_EXAMPLES_NXTERM_TOOLBAR_HEIGHT, &g_nxtoolcb, NULL);
if (ret < 0) if (ret < 0)
{ {
printf("nxterm_main: nxtk_opentoolbar failed: %d\n", errno); printf("nxterm_main: nxtk_opentoolbar failed: %d\n", errno);
@ -347,11 +347,11 @@ int nxterm_main(int argc, char **argv)
/* NxTerm Configuration ************************************************/ /* NxTerm Configuration ************************************************/
/* Use the window to create an NX console */ /* Use the window to create an NX console */
g_nxterm_vars.wndo.wcolor[0] = CONFIG_EXAMPLES_NXCON_WCOLOR; g_nxterm_vars.wndo.wcolor[0] = CONFIG_EXAMPLES_NXTERM_WCOLOR;
g_nxterm_vars.wndo.fcolor[0] = CONFIG_EXAMPLES_NXCON_FONTCOLOR; g_nxterm_vars.wndo.fcolor[0] = CONFIG_EXAMPLES_NXTERM_FONTCOLOR;
g_nxterm_vars.wndo.fontid = CONFIG_EXAMPLES_NXCON_FONTID; g_nxterm_vars.wndo.fontid = CONFIG_EXAMPLES_NXTERM_FONTID;
g_nxterm_vars.hdrvr = nxtk_register(g_nxterm_vars.hwnd, &g_nxterm_vars.wndo, CONFIG_EXAMPLES_NXCON_MINOR); g_nxterm_vars.hdrvr = nxtk_register(g_nxterm_vars.hwnd, &g_nxterm_vars.wndo, CONFIG_EXAMPLES_NXTERM_MINOR);
if (!g_nxterm_vars.hdrvr) if (!g_nxterm_vars.hdrvr)
{ {
printf("nxterm_main: nxtk_register failed: %d\n", errno); printf("nxterm_main: nxtk_register failed: %d\n", errno);
@ -360,11 +360,11 @@ int nxterm_main(int argc, char **argv)
/* Open the NxTerm driver */ /* Open the NxTerm driver */
fd = open(CONFIG_EXAMPLES_NXCON_DEVNAME, O_WRONLY); fd = open(CONFIG_EXAMPLES_NXTERM_DEVNAME, O_WRONLY);
if (fd < 0) if (fd < 0)
{ {
printf("nxterm_main: open %s read-only failed: %d\n", printf("nxterm_main: open %s read-only failed: %d\n",
CONFIG_EXAMPLES_NXCON_DEVNAME, errno); CONFIG_EXAMPLES_NXTERM_DEVNAME, errno);
goto errout_with_driver; goto errout_with_driver;
} }

View File

@ -88,7 +88,7 @@ int nxterm_server(int argc, char *argv[])
FAR NX_DRIVERTYPE *dev; FAR NX_DRIVERTYPE *dev;
int ret; int ret;
#if defined(CONFIG_EXAMPLES_NXCON_EXTERNINIT) #if defined(CONFIG_EXAMPLES_NXTERM_EXTERNINIT)
struct boardioc_graphics_s devinfo; struct boardioc_graphics_s devinfo;
int ret; int ret;
@ -96,14 +96,14 @@ int nxterm_server(int argc, char *argv[])
printf("nxterm_server: Initializing external graphics device\n"); printf("nxterm_server: Initializing external graphics device\n");
devinfo.devno = CONFIG_EXAMPLES_NXCON_DEVNO; devinfo.devno = CONFIG_EXAMPLES_NXTERM_DEVNO;
devinfo.dev = NULL; devinfo.dev = NULL;
ret = boardctl(BOARDIOC_GRAPHICS_SETUP, (uintptr_t)&devinfo); ret = boardctl(BOARDIOC_GRAPHICS_SETUP, (uintptr_t)&devinfo);
if (ret < 0) if (ret < 0)
{ {
printf("nxterm_server: boardctl failed, devno=%d: %d\n", printf("nxterm_server: boardctl failed, devno=%d: %d\n",
CONFIG_EXAMPLES_NXCON_DEVNO, errno); CONFIG_EXAMPLES_NXTERM_DEVNO, errno);
return ERROR; return ERROR;
} }
@ -122,11 +122,11 @@ int nxterm_server(int argc, char *argv[])
/* Get the device instance */ /* Get the device instance */
dev = board_lcd_getdev(CONFIG_EXAMPLES_NXCON_DEVNO); dev = board_lcd_getdev(CONFIG_EXAMPLES_NXTERM_DEVNO);
if (!dev) if (!dev)
{ {
printf("nxterm_server: board_lcd_getdev failed, devno=%d\n", printf("nxterm_server: board_lcd_getdev failed, devno=%d\n",
CONFIG_EXAMPLES_NXCON_DEVNO); CONFIG_EXAMPLES_NXTERM_DEVNO);
return 2; return 2;
} }
@ -144,10 +144,10 @@ int nxterm_server(int argc, char *argv[])
return 1; return 1;
} }
dev = up_fbgetvplane(CONFIG_EXAMPLES_NXCON_VPLANE); dev = up_fbgetvplane(CONFIG_EXAMPLES_NXTERM_VPLANE);
if (!dev) if (!dev)
{ {
printf("nxterm_server: up_fbgetvplane failed, vplane=%d\n", CONFIG_EXAMPLES_NXCON_VPLANE); printf("nxterm_server: up_fbgetvplane failed, vplane=%d\n", CONFIG_EXAMPLES_NXTERM_VPLANE);
return 2; return 2;
} }
#endif #endif

View File

@ -121,7 +121,7 @@ static void nxtool_redraw(NXWINDOW hwnd, FAR const struct nxgl_rect_s *rect,
hwnd, rect->pt1.x, rect->pt1.y, rect->pt2.x, rect->pt2.y, hwnd, rect->pt1.x, rect->pt1.y, rect->pt2.x, rect->pt2.y,
more ? "true" : "false"); more ? "true" : "false");
color[0] = CONFIG_EXAMPLES_NXCON_TBCOLOR; color[0] = CONFIG_EXAMPLES_NXTERM_TBCOLOR;
ret = nxtk_filltoolbar(hwnd, rect, color); ret = nxtk_filltoolbar(hwnd, rect, color);
if (ret < 0) if (ret < 0)
{ {

View File

@ -133,7 +133,7 @@ static void nxwndo_redraw(NXWINDOW hwnd, FAR const struct nxgl_rect_s *rect,
{ {
/* If the driver has not been opened, then just redraw the window color */ /* If the driver has not been opened, then just redraw the window color */
wcolor[0] = CONFIG_EXAMPLES_NXCON_WCOLOR; wcolor[0] = CONFIG_EXAMPLES_NXTERM_WCOLOR;
(void)nxtk_fillwindow(hwnd, rect, wcolor); (void)nxtk_fillwindow(hwnd, rect, wcolor);
} }
} }

View File

@ -771,7 +771,7 @@ static int dhcpd_addoption32(uint8_t code, uint32_t value)
* Name: dhcp_addoption32p * Name: dhcp_addoption32p
****************************************************************************/ ****************************************************************************/
#if HAVE_DNSIP #ifdef HAVE_DSNIP
static int dhcp_addoption32p(uint8_t code, FAR uint8_t *value) static int dhcp_addoption32p(uint8_t code, FAR uint8_t *value)
{ {
uint8_t option[6]; uint8_t option[6];
@ -1005,7 +1005,7 @@ static int dhcpd_sendpacket(int bbroadcast)
static inline int dhcpd_sendoffer(in_addr_t ipaddr, uint32_t leasetime) static inline int dhcpd_sendoffer(in_addr_t ipaddr, uint32_t leasetime)
{ {
in_addr_t netaddr; in_addr_t netaddr;
#if HAVE_DNSIP #ifdef HAVE_DSNIP
uint32_t dnsaddr; uint32_t dnsaddr;
dnsaddr = htonl(CONFIG_NETUTILS_DHCPD_DNSIP); dnsaddr = htonl(CONFIG_NETUTILS_DHCPD_DNSIP);
#endif #endif
@ -1025,13 +1025,13 @@ static inline int dhcpd_sendoffer(in_addr_t ipaddr, uint32_t leasetime)
/* Add the leasetime to the response options */ /* Add the leasetime to the response options */
dhcpd_addoption32(DHCP_OPTION_LEASE_TIME, htonl(leasetime)); dhcpd_addoption32(DHCP_OPTION_LEASE_TIME, htonl(leasetime));
#if HAVE_NETMASK #ifdef HAVE_NETMASK
dhcpd_addoption32(DHCP_OPTION_SUBNET_MASK, htonl(CONFIG_NETUTILS_DHCPD_NETMASK)); dhcpd_addoption32(DHCP_OPTION_SUBNET_MASK, htonl(CONFIG_NETUTILS_DHCPD_NETMASK));
#endif #endif
#if HAVE_ROUTERIP #ifdef HAVE_ROUTERIP
dhcpd_addoption32(DHCP_OPTION_ROUTER, htonl(CONFIG_NETUTILS_DHCPD_ROUTERIP)); dhcpd_addoption32(DHCP_OPTION_ROUTER, htonl(CONFIG_NETUTILS_DHCPD_ROUTERIP));
#endif #endif
#if HAVE_DNSIP #ifdef HAVE_DSNIP
dhcp_addoption32p(DHCP_OPTION_DNS_SERVER, (FAR uint8_t*)&dnsaddr); dhcp_addoption32p(DHCP_OPTION_DNS_SERVER, (FAR uint8_t*)&dnsaddr);
#endif #endif
@ -1065,7 +1065,7 @@ int dhcpd_sendack(in_addr_t ipaddr)
{ {
uint32_t leasetime = CONFIG_NETUTILS_DHCPD_LEASETIME; uint32_t leasetime = CONFIG_NETUTILS_DHCPD_LEASETIME;
in_addr_t netaddr; in_addr_t netaddr;
#if HAVE_DNSIP #ifdef HAVE_DSNIP
uint32_t dnsaddr; uint32_t dnsaddr;
dnsaddr = htonl(CONFIG_NETUTILS_DHCPD_DNSIP); dnsaddr = htonl(CONFIG_NETUTILS_DHCPD_DNSIP);
#endif #endif
@ -1087,13 +1087,13 @@ int dhcpd_sendack(in_addr_t ipaddr)
/* Add the lease time to the response */ /* Add the lease time to the response */
dhcpd_addoption32(DHCP_OPTION_LEASE_TIME, htonl(leasetime)); dhcpd_addoption32(DHCP_OPTION_LEASE_TIME, htonl(leasetime));
#if HAVE_NETMASK #ifdef HAVE_NETMASK
dhcpd_addoption32(DHCP_OPTION_SUBNET_MASK, htonl(CONFIG_NETUTILS_DHCPD_NETMASK)); dhcpd_addoption32(DHCP_OPTION_SUBNET_MASK, htonl(CONFIG_NETUTILS_DHCPD_NETMASK));
#endif #endif
#if HAVE_ROUTERIP #ifdef HAVE_ROUTERIP
dhcpd_addoption32(DHCP_OPTION_ROUTER, htonl(CONFIG_NETUTILS_DHCPD_ROUTERIP)); dhcpd_addoption32(DHCP_OPTION_ROUTER, htonl(CONFIG_NETUTILS_DHCPD_ROUTERIP));
#endif #endif
#if HAVE_DNSIP #ifdef HAVE_DSNIP
dhcp_addoption32p(DHCP_OPTION_DNS_SERVER, (FAR uint8_t*)&dnsaddr); dhcp_addoption32p(DHCP_OPTION_DNS_SERVER, (FAR uint8_t*)&dnsaddr);
#endif #endif