Skip to content

Commit 6714c04

Browse files
committed
adjust struct hostent for compatibility
1 parent 39a53c4 commit 6714c04

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

libctru/include/netdb.h

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,13 @@
99
#define TRY_AGAIN 4
1010

1111
struct hostent {
12-
char *h_name;
13-
char **h_aliases;
14-
int h_addrtype;
15-
int h_length;
16-
char **h_addr_list;
17-
char *h_addr;
12+
char *h_name; /* official name of host */
13+
char **h_aliases; /* alias list */
14+
uint16_t h_addrtype; /* host address type */
15+
uint16_t h_length; /* length of address */
16+
char **h_addr_list; /* list of addresses from name server */
1817
};
19-
18+
#define h_addr h_addr_list[0] /* for backward compatibility */
2019

2120
#define AI_PASSIVE 0x01
2221
#define AI_CANONNAME 0x02

0 commit comments

Comments
 (0)