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

[Minios-devel] [UNIKRAFT LWIP PATCH v2 6/6] Further protect gethostbyname* defines



lwip_gethostbyname and lwip_gethostbyname_r definitions are protected
by LWIP_DNS && LWIP_SOCKET

Signed-off-by: Mihai Pogonaru <pogonarumihai@xxxxxxxxx>
---
 include/netdb.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/include/netdb.h b/include/netdb.h
index bf5edff..dbed0cd 100644
--- a/include/netdb.h
+++ b/include/netdb.h
@@ -1,12 +1,12 @@
-#if !(LWIP_COMPAT_SOCKETS)
+#include <compat/posix/netdb.h>
+
+#if LWIP_DNS && LWIP_SOCKET && !(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>
+#endif /* LWIP_DNS && LWIP_SOCKET && !(LWIP_COMPAT_SOCKETS) */
 
 struct servent {
        char    *s_name;        /* official service name */
-- 
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®.