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:
@@ -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;
|
||||
|
Reference in New Issue
Block a user