summaryrefslogtreecommitdiff
path: root/src/ip.cpp
diff options
context:
space:
mode:
authorMartin Lucina <martin@lucina.net>2012-01-23 09:00:29 +0100
committerMartin Lucina <martin@lucina.net>2012-01-23 09:00:29 +0100
commitba0336b4d129a9e261c95276f89640b3459176bf (patch)
treea488f7efb61a6950a462815062c3b0f007f40ff5 /src/ip.cpp
parentc3363afa881b46f3df8a6b72ed15cfbac18f4713 (diff)
parent4016b657973bba87caf75168ba70aaa85d556487 (diff)
Merge commit 'upstream/2.1.11'
Diffstat (limited to 'src/ip.cpp')
-rw-r--r--src/ip.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ip.cpp b/src/ip.cpp
index 206f0e9..7ef698b 100644
--- a/src/ip.cpp
+++ b/src/ip.cpp
@@ -102,7 +102,7 @@ static int resolve_nic_name (in_addr* addr_, char const *interface_)
return 0;
}
-#elif defined ZMQ_HAVE_AIX || ZMQ_HAVE_HPUX || ZMQ_HAVE_ANDROID
+#elif defined ZMQ_HAVE_AIX || defined ZMQ_HAVE_HPUX || defined ZMQ_HAVE_ANDROID
#include <sys/ioctl.h>
#include <net/if.h>
@@ -188,7 +188,7 @@ int zmq::open_socket (int domain_, int type_, int protocol_)
{
// Setting this option result in sane behaviour when exec() functions
// are used. Old sockets are closed and don't block TCP ports etc.
-#if defined SOCK_CLOEXEC
+#if defined HAVE_SOCK_CLOEXEC
type_ |= SOCK_CLOEXEC;
#endif
@@ -199,7 +199,7 @@ int zmq::open_socket (int domain_, int type_, int protocol_)
// If there's no SOCK_CLOEXEC, let's try the second best option. Note that
// race condition can cause socket not to be closed (if fork happens
// between socket creation and this point).
-#if !defined SOCK_CLOEXEC && defined FD_CLOEXEC
+#if !defined HAVE_SOCK_CLOEXEC && defined FD_CLOEXEC
int rc = fcntl (s, F_SETFD, FD_CLOEXEC);
errno_assert (rc != -1);
#endif