For better ABI compatibility and interopability, the data types that
are defined in `<lwip/netdb.h>` are replaced by the ones shipped with
the musl library (`<netdb.h>`) if available.
Signed-off-by: Simon Kuenzer <simon@unikraft.io>
Reviewed-by: Eduard Vintilă <eduard.vintila47@gmail.com>
Reviewed-by: Razvan Deaconescu <razvand@unikraft.io>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
GitHub-Closes: #48
#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 <netdb.h>
+#endif /* CONFIG_LIBMUSL_NETWORK */
#endif /* LWIP_DNS */
/**