Merged in masayuki2009/nuttx.nuttx/fix_build_error_with_protected_build (pull request #695)

libs/libc/netdb: Fix a link error in lib_gethostbynamer.c with protected build.

NOTE: g_lo_ipv4addr also exists in net/loopback/lo_globals.c which
can be linked with kernel build only.

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>

Approved-by: GregoryN <gnutt@nuttx.org>
This commit is contained in:
Masayuki Ishikawa 2018-07-25 12:23:45 +00:00 committed by GregoryN
parent 874bf7835d
commit 5340027e4e
1 changed files with 18 additions and 0 deletions

View File

@ -70,6 +70,24 @@ struct hostent_info_s
char hi_data[1];
};
/****************************************************************************
* Public Data
****************************************************************************/
#ifndef __KERNEL__
/* Local loopback addresses for user mode */
#ifdef CONFIG_NET_IPv4
const in_addr_t g_lo_ipv4addr = HTONL(0x7f000001);
#else /* CONFIG_NET_IPv6 */
const net_ipv6addr_t g_lo_ipv6addr =
{
HTONS(0), HTONS(0), HTONS(0), HTONS(0),
HTONS(0), HTONS(0), HTONS(0), HTONS(1)
};
#endif
#endif /* ifndef __KERNEL */
/****************************************************************************
* Private functions
****************************************************************************/