From: Simon Kuenzer Date: Sun, 4 Feb 2024 14:29:29 +0000 (+0100) Subject: netdb: Prefer musl data types if available X-Git-Tag: RELEASE-0.16.2~2 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=75453a60774246113b65b6dbb4e83a35bc894f5f;p=unikraft%2Flibs%2Flwip.git netdb: Prefer musl data types if available For better ABI compatibility and interopability, the data types that are defined in `` are replaced by the ones shipped with the musl library (``) if available. Signed-off-by: Simon Kuenzer Reviewed-by: Eduard Vintilă Reviewed-by: Razvan Deaconescu Approved-by: Razvan Deaconescu GitHub-Closes: #48 --- diff --git a/include/lwipopts.h b/include/lwipopts.h index a79d617..66c26f3 100644 --- a/include/lwipopts.h +++ b/include/lwipopts.h @@ -265,6 +265,15 @@ void sys_free(void *ptr); #define DNS_TABLE_SIZE CONFIG_LWIP_DNS_TABLE_SIZE #define DNS_LOCAL_HOST_LIST 1 #define DNS_LOCAL_HOSTLIST_IS_DYNAMIC 1 + +#if CONFIG_LIBMUSL_NETWORK +/* lwip should not declare its own data types */ +#define LWIP_DNS_API_DECLARE_H_ERRNO 0 +#define LWIP_DNS_API_DEFINE_ERRORS 0 +#define LWIP_DNS_API_DEFINE_FLAGS 0 +#define LWIP_DNS_API_DECLARE_STRUCTS 0 +#include +#endif /* CONFIG_LIBMUSL_NETWORK */ #endif /* LWIP_DNS */ /**