inet_pton and ntop need to support IPv4 and IPv6 addressing unconditionally for the netdb logic

This commit is contained in:
Gregory Nutt 2015-07-08 16:45:42 -06:00
parent d58d668f86
commit 434eeefe52
2 changed files with 30 additions and 0 deletions

View File

@ -53,6 +53,21 @@
#include <arpa/inet.h>
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
/* If netdb support is enabled, then we need to be able to manage IPv4 and
* IPv6 addresses, regardless of networking support.
*/
#ifdef CONFIG_LIB_NETDB
# undef CONFIG_NET_IPv4
# undef CONFIG_NET_IPv6
# define CONFIG_NET_IPv4 1
# define CONFIG_NET_IPv6 1
#endif
/****************************************************************************
* Private Functions
****************************************************************************/

View File

@ -55,6 +55,21 @@
#include <arpa/inet.h>
#include <netinet/in.h>
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
/* If netdb support is enabled, then we need to be able to manage IPv4 and
* IPv6 addresses, regardless of networking support.
*/
#ifdef CONFIG_LIB_NETDB
# undef CONFIG_NET_IPv4
# undef CONFIG_NET_IPv6
# define CONFIG_NET_IPv4 1
# define CONFIG_NET_IPv6 1
#endif
/****************************************************************************
* Private Functions
****************************************************************************/