mirror of
https://github.com/zeromq/libzmq.git
synced 2024-12-13 18:55:10 +01:00
care taken of the fact that AI_NUMERICSERV is not defined on OSX 10.5
This commit is contained in:
parent
817c89a78e
commit
7778010d76
11
src/ip.cpp
11
src/ip.cpp
@ -239,7 +239,11 @@ int zmq::resolve_ip_interface (sockaddr_storage* addr_, socklen_t *addr_len_,
|
|||||||
|
|
||||||
// Restrict hostname/service to literals to avoid any DNS lookups or
|
// Restrict hostname/service to literals to avoid any DNS lookups or
|
||||||
// service-name irregularity due to indeterminate socktype.
|
// service-name irregularity due to indeterminate socktype.
|
||||||
req.ai_flags = AI_PASSIVE | AI_NUMERICHOST | AI_NUMERICSERV;
|
#if defined ZMQ_HAVE_OSX
|
||||||
|
req.ai_flags = AI_PASSIVE | AI_NUMERICHOST;
|
||||||
|
#else
|
||||||
|
req.ai_flags = AI_PASSIVE | AI_NUMERICHOST | AI_NUMERICSERV;
|
||||||
|
#endif
|
||||||
|
|
||||||
// Resolve the literal address. Some of the error info is lost in case
|
// Resolve the literal address. Some of the error info is lost in case
|
||||||
// of error, however, there's no way to report EAI errors via errno.
|
// of error, however, there's no way to report EAI errors via errno.
|
||||||
@ -289,6 +293,11 @@ int zmq::resolve_ip_hostname (sockaddr_storage *addr_, socklen_t *addr_len_,
|
|||||||
// Avoid named services due to unclear socktype, and don't pick IPv6
|
// Avoid named services due to unclear socktype, and don't pick IPv6
|
||||||
// addresses if we don't have a local IPv6 address configured.
|
// addresses if we don't have a local IPv6 address configured.
|
||||||
req.ai_flags = AI_NUMERICSERV | AI_ADDRCONFIG;
|
req.ai_flags = AI_NUMERICSERV | AI_ADDRCONFIG;
|
||||||
|
#if defined ZMQ_HAVE_OSX
|
||||||
|
req.ai_flags = AI_ADDRCONFIG;
|
||||||
|
#else
|
||||||
|
req.ai_flags = AI_NUMERICSERV | AI_ADDRCONFIG;
|
||||||
|
#endif
|
||||||
|
|
||||||
// Resolve host name. Some of the error info is lost in case of error,
|
// Resolve host name. Some of the error info is lost in case of error,
|
||||||
// however, there's no way to report EAI errors via errno.
|
// however, there's no way to report EAI errors via errno.
|
||||||
|
Loading…
Reference in New Issue
Block a user