From 6714c04806c1164eef0718191060ee7a38e64d77 Mon Sep 17 00:00:00 2001 From: Dave Murphy Date: Mon, 8 May 2023 00:09:58 +0100 Subject: [PATCH] adjust struct hostent for compatibility --- libctru/include/netdb.h | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/libctru/include/netdb.h b/libctru/include/netdb.h index 836195a..0f4b047 100644 --- a/libctru/include/netdb.h +++ b/libctru/include/netdb.h @@ -9,14 +9,13 @@ #define TRY_AGAIN 4 struct hostent { - char *h_name; - char **h_aliases; - int h_addrtype; - int h_length; - char **h_addr_list; - char *h_addr; + char *h_name; /* official name of host */ + char **h_aliases; /* alias list */ + uint16_t h_addrtype; /* host address type */ + uint16_t h_length; /* length of address */ + char **h_addr_list; /* list of addresses from name server */ }; - +#define h_addr h_addr_list[0] /* for backward compatibility */ #define AI_PASSIVE 0x01 #define AI_CANONNAME 0x02