[ovs-dev] [PATCH 05/14] socket-util: getaddrinfo return values for Windows.
Gurucharan Shetty
shettyg at nicira.com
Wed Feb 19 23:36:16 UTC 2014
Couple of return values need changes.
* EAI_NODATA is the same as EAI_NONAME. So we prevent duplicate cases.
* Windows does not have a EAI_SYSTEM.
Signed-off-by: Gurucharan Shetty <gshetty at nicira.com>
---
lib/socket-util.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/lib/socket-util.c b/lib/socket-util.c
index b3b1ae5..0132133 100644
--- a/lib/socket-util.c
+++ b/lib/socket-util.c
@@ -265,13 +265,17 @@ lookup_hostname(const char *host_name, struct in_addr *addr)
case EAI_MEMORY:
return ENOMEM;
+#ifndef _WIN32
#ifdef EAI_NODATA
case EAI_NODATA:
return ENXIO;
#endif
+#endif
+#ifdef EAI_SYSTEM
case EAI_SYSTEM:
return sock_errno();
+#endif
default:
return EPROTO;
--
1.7.9.5
More information about the dev
mailing list