From: Mihai Pogonaru Date: Sat, 15 Jun 2019 13:18:19 +0000 (+0300) Subject: Provide gethostbyname and gethostbyname_r X-Git-Tag: RELEASE-0.4~59 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=7c5731b0957e500a8c04dccc43037edebeb68294;p=unikraft%2Flibs%2Flwip.git 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 Reviewed-by: Costin Lupu --- diff --git a/exportsyms.uk b/exportsyms.uk index 534e49a..9d40bcd 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 struct servent {