diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2015-01-18 11:17:00 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2015-01-18 11:17:00 -0600 |
commit | c61e3256781a68f683307f56f0aee1ca1b707d63 (patch) | |
tree | e4988301e1693caf9351b3635f9b9c3c7919657c /apps | |
parent | be235e96e630be257fd3ff0ef90c7342b8628fac (diff) | |
download | px4-nuttx-c61e3256781a68f683307f56f0aee1ca1b707d63.tar.gz px4-nuttx-c61e3256781a68f683307f56f0aee1ca1b707d63.tar.bz2 px4-nuttx-c61e3256781a68f683307f56f0aee1ca1b707d63.zip |
Refresh configuration/update some misnamed conditional compilation
Diffstat (limited to 'apps')
-rw-r--r-- | apps/include/netutils/dnsclient.h | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/apps/include/netutils/dnsclient.h b/apps/include/netutils/dnsclient.h index 6261ece91..943e93154 100644 --- a/apps/include/netutils/dnsclient.h +++ b/apps/include/netutils/dnsclient.h @@ -49,6 +49,22 @@ #include <netinet/in.h> /**************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ +/* If both IPv4 and IPv6 are enabled, the DNS client can support only one or + * the other. + */ + +#if !defined(CONFIG_NETUTILS_DNSCLIENT_IPv4) && \ + !defined(CONFIG_NETUTILS_DNSCLIENT_IPv6) +# ifdef CONFIG_NET_IPv6 +# define CONFIG_NETUTILS_DNSCLIENT_IPv6 1 +# else +# define CONFIG_NETUTILS_DNSCLIENT_IPv4 1 +# endif +#endif + +/**************************************************************************** * Public Function Prototypes ****************************************************************************/ @@ -127,7 +143,7 @@ int dns_query(FAR const char *hostname, FAR in_addr_t *ipaddr); * ****************************************************************************/ -#ifdef CONFIG_NET_IPv6 +#ifdef CONFIG_NETUTILS_DNSCLIENT_IPv6 void dns_setserver(FAR const struct in6_addr *dnsserver); #else void dns_setserver(FAR const struct in_addr *dnsserver); @@ -155,7 +171,7 @@ void dns_getserver(FAR struct in_addr *dnsserver); * ****************************************************************************/ -#ifdef CONFIG_NET_IPv6 +#ifdef CONFIG_NETUTILS_DNSCLIENT_IPv6 int dns_whois_socket(int sockfd, FAR const char *name, FAR struct sockaddr_in6 *addr); #else @@ -172,7 +188,7 @@ int dns_whois_socket(int sockfd, FAR const char *name, * ****************************************************************************/ -#ifdef CONFIG_NET_IPv6 +#ifdef CONFIG_NETUTILS_DNSCLIENT_IPv6 int dns_whois(FAR const char *name, FAR struct sockaddr_in6 *addr); #else int dns_whois(FAR const char *name, FAR struct sockaddr_in *addr); |