libc/netdb: Support save the mix of IPv4/IPv6 address into hostent

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I704d38afde14b6d90a7726096fd1f483f96ba237
This commit is contained in:
Xiang Xiao
2020-03-30 15:45:08 +08:00
committed by patacongo
parent 7f2810f73a
commit 8d66a316da
5 changed files with 101 additions and 98 deletions
+5 -2
View File
@@ -184,14 +184,17 @@ struct hostent
FAR char **h_aliases; /* A pointer to an array of pointers to the
* alternative host names, terminated by a
* null pointer. */
int h_addrtype; /* Address type. */
int h_length; /* The length, in bytes, of the address. */
FAR int *h_addrtypes; /* A pointer to an array of address type. */
FAR int *h_lengths; /* A pointer to an array of the length, in bytes,
* of the address. */
FAR char **h_addr_list; /* A pointer to an array of pointers to network
* addresses (in network byte order) for the host,
* terminated by a null pointer. */
};
#define h_addr h_addr_list[0] /* For backward compatibility */
#define h_length h_lengths[0]
#define h_addrtype h_addrtypes[0]
struct netent
{