From f87358faf93594e76d871a996494f273bc78fc28 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Tue, 12 Jan 2016 07:05:50 -0600 Subject: [PATCH] correct some conditional compilation; update some comments --- net/procfs/netdev_statistics.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/net/procfs/netdev_statistics.c b/net/procfs/netdev_statistics.c index 61bc0f3573..16cfb440d9 100644 --- a/net/procfs/netdev_statistics.c +++ b/net/procfs/netdev_statistics.c @@ -247,7 +247,12 @@ static int netprocfs_ipaddresses(FAR struct netprocfs_file_s *netfile) len += snprintf(&netfile->line[len], NET_LINELEN - len, "Mask:%s\n", inet_ntoa(addr)); -#if defined(CONFIG_NSH_DHCPC) || defined(CONFIG_NSH_DNS) +#if defined(CONFIG_BUILD_FLAT) && defined(CONFIG_NETDB_DNSCLIENT) + /* Show the IPv4 DNS address */ + /* REVISIT: DNS client is global, not per device, and resides in the + * application space and is not generally accessible from kernel space. + */ + dns_getaddr(&addr); len += snprintf(&netfile->line[len], NET_LINELEN - len, "\tDNSaddr:%s\n", inet_ntoa(addr)); @@ -275,7 +280,8 @@ static int netprocfs_ipaddresses(FAR struct netprocfs_file_s *netfile) "\tinet6 DRaddr:%s/%d\n", addrstr, preflen); } -#if defined(CONFIG_NSH_DHCPCv6) || defined(CONFIG_NSH_DNS) +#if defined(CONFIG_BUILD_FLAT) && defined(CONFIG_NETDB_DNSCLIENT) + /* Show the IPv6 DNS address */ # warning Missing logic #endif #endif