diff --git a/libs/libc/netdb/lib_gethostbynamer.c b/libs/libc/netdb/lib_gethostbynamer.c index 051d1e9739..2d5e788172 100644 --- a/libs/libc/netdb/lib_gethostbynamer.c +++ b/libs/libc/netdb/lib_gethostbynamer.c @@ -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 ****************************************************************************/