diff --git a/libc/net/lib_inetntop.c b/libc/net/lib_inetntop.c index 1f3d33c6f4c..e788f768de8 100644 --- a/libc/net/lib_inetntop.c +++ b/libc/net/lib_inetntop.c @@ -53,6 +53,21 @@ #include +/**************************************************************************** + * 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 ****************************************************************************/ diff --git a/libc/net/lib_inetpton.c b/libc/net/lib_inetpton.c index 72229d2f2c3..fda5a9d4862 100644 --- a/libc/net/lib_inetpton.c +++ b/libc/net/lib_inetpton.c @@ -55,6 +55,21 @@ #include #include +/**************************************************************************** + * 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 ****************************************************************************/