Define gethostbyname and gethostbyname_r as their LWIP counterparts.
The defines are in place in origin/netdb.h, but they are protected by
LWIP_COMPAT_SOCKETS, which for us is defined as 0 since we provide
wrappers for most of socket.h functions.
Signed-off-by: Mihai Pogonaru <pogonarumihai@gmail.com>
Reviewed-by: Costin Lupu <costin.lupu@cs.pub.ro>
lwip_ioctl
lwip_htonl
lwip_htons
+lwip_gethostbyname
+lwip_gethostbyname_r
poll
recv
recvfrom
+#if !(LWIP_COMPAT_SOCKETS)
+
+#define gethostbyname(name) lwip_gethostbyname(name)
+#define gethostbyname_r(name, ret, buf, buflen, result, h_errnop) \
+ lwip_gethostbyname_r(name, ret, buf, buflen, result, h_errnop)
+
+#endif /* !(LWIP_COMPAT_SOCKETS) */
+
#include <compat/posix/netdb.h>
struct servent {