[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Minios-devel] [UNIKRAFT/LWIP PATCH v2] Provide gethostbyname and gethostbyname_r



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@xxxxxxxxx>
---
 exportsyms.uk   | 2 ++
 include/netdb.h | 8 ++++++++
 2 files changed, 10 insertions(+)

diff --git a/exportsyms.uk b/exportsyms.uk
index 1720e00..370904a 100644
--- a/exportsyms.uk
+++ b/exportsyms.uk
@@ -9,6 +9,8 @@ listen
 lwip_ioctl
 lwip_htonl
 lwip_htons
+lwip_gethostbyname
+lwip_gethostbyname_r
 poll
 recv
 recvfrom
diff --git a/include/netdb.h b/include/netdb.h
index 6ba6aad..bf5edff 100644
--- a/include/netdb.h
+++ b/include/netdb.h
@@ -1,3 +1,11 @@
+#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 {
-- 
2.11.0


_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.