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

[Minios-devel] [UNIKRAFT/LWIP PATCH] Provide gethostbyname and gethostbyname_r. Change broken link



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.

Change broken download link for LWIP.

Signed-off-by: Mihai Pogonaru <pogonarumihai@xxxxxxxxx>
---
 Makefile.uk     | 2 +-
 exportsyms.uk   | 2 ++
 include/netdb.h | 8 ++++++++
 3 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/Makefile.uk b/Makefile.uk
index e7b7cc6..6ddb105 100644
--- a/Makefile.uk
+++ b/Makefile.uk
@@ -44,7 +44,7 @@ $(eval $(call addlib_s,liblwip,$(CONFIG_LIBLWIP)))
 # Sources
 
################################################################################
 LIBLWIP_ZIPNAME=lwip-2.1.2
-LIBLWIP_URL=http://download.savannah.nongnu.org/releases/lwip/$(LIBLWIP_ZIPNAME).zip
+LIBLWIP_URL=https://download.savannah.gnu.org/releases/lwip/$(LIBLWIP_ZIPNAME).zip
 LIBLWIP_PATCHDIR=$(LIBLWIP_BASE)/patches
 $(eval $(call fetch,liblwip,$(LIBLWIP_URL)))
 $(eval $(call patch,liblwip,$(LIBLWIP_PATCHDIR),$(LIBLWIP_ZIPNAME)))
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..683570c 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®.