2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-31 14:25:26 +00:00

socket-util: restore building on FreeBSD.

FreeBSD does not have EAI_ADDRFAMILY or EAI_NODATA and thus failed to build
after commit 3cbb5dc7e8 "socket-util: Use
getaddrinfo() instead of gethostbyname() for thread safety."

Signed-off-by: Ed Maste <emaste@freebsd.org>
Signed-off-by: Ben Pfaff <blp@nicira.com>
This commit is contained in:
Ed Maste
2013-05-03 16:31:02 -04:00
committed by Ben Pfaff
parent 5b7126361f
commit 44f645a583

View File

@@ -201,7 +201,9 @@ lookup_hostname(const char *host_name, struct in_addr *addr)
freeaddrinfo(result);
return 0;
#ifdef EAI_ADDRFAMILY
case EAI_ADDRFAMILY:
#endif
case EAI_NONAME:
case EAI_SERVICE:
return ENOENT;
@@ -220,8 +222,10 @@ lookup_hostname(const char *host_name, struct in_addr *addr)
case EAI_MEMORY:
return ENOMEM;
#ifdef EAI_NODATA
case EAI_NODATA:
return ENXIO;
#endif
case EAI_SYSTEM:
return errno;