From 64002626b975dfad586fedb5eecc3ed24167d9c7 Mon Sep 17 00:00:00 2001 From: Bananymous Date: Tue, 15 Apr 2025 21:39:50 +0300 Subject: [PATCH] LibC: Add h_addr definition for hostent backwards compatibility --- userspace/libraries/LibC/include/netdb.h | 1 + 1 file changed, 1 insertion(+) diff --git a/userspace/libraries/LibC/include/netdb.h b/userspace/libraries/LibC/include/netdb.h index 466e034e..e06474fe 100644 --- a/userspace/libraries/LibC/include/netdb.h +++ b/userspace/libraries/LibC/include/netdb.h @@ -54,6 +54,7 @@ struct hostent int h_addrtype; /* Address type. */ int h_length; /* The length, in bytes, of the address. */ 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] /* Backwards compatibility */ }; struct netent