]> xenbits.xensource.com Git - unikraft/libs/lwip.git/commitdiff
Provide gethostbyname and gethostbyname_r
authorMihai Pogonaru <pogonarumihai@gmail.com>
Sat, 15 Jun 2019 13:18:19 +0000 (16:18 +0300)
committerFelipe Huici <felipe.huici@neclab.eu>
Sat, 15 Jun 2019 21:02:52 +0000 (23:02 +0200)
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>
exportsyms.uk
include/netdb.h

index 534e49a883c44dc3bd3cd86c2749722ba7331401..9d40bcdab56deea848eec71c2ea8305ede7c1278 100644 (file)
@@ -9,6 +9,8 @@ listen
 lwip_ioctl
 lwip_htonl
 lwip_htons
+lwip_gethostbyname
+lwip_gethostbyname_r
 poll
 recv
 recvfrom
index 6ba6aad856fc848d278dc2d4c7b5b4d93174ec34..bf5edff261086a573c4957a6bb50ced2e5af024a 100644 (file)
@@ -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 {