diff --git a/src/err.cpp b/src/err.cpp index 1ca7200e..cd7a86c6 100644 --- a/src/err.cpp +++ b/src/err.cpp @@ -28,7 +28,6 @@ */ #include "err.hpp" -#include "platform.hpp" const char *zmq::errno_to_string (int errno_) { diff --git a/src/err.hpp b/src/err.hpp index fcefb892..02c9e8ef 100644 --- a/src/err.hpp +++ b/src/err.hpp @@ -41,10 +41,6 @@ #include #include "platform.hpp" -#include "likely.hpp" - -// 0MQ-specific error codes are defined in zmq.h -#include "../include/zmq.h" #ifdef ZMQ_HAVE_WINDOWS #include "windows.hpp" @@ -52,6 +48,11 @@ #include #endif +#include "likely.hpp" + +// 0MQ-specific error codes are defined in zmq.h +#include "../include/zmq.h" + // EPROTO is not used by OpenBSD and maybe other platforms. #ifndef EPROTO #define EPROTO 0 diff --git a/src/msg.cpp b/src/msg.cpp index 00ed1595..95116b90 100644 --- a/src/msg.cpp +++ b/src/msg.cpp @@ -27,6 +27,12 @@ along with this program. If not, see . */ +#include "platform.hpp" + +#ifdef ZMQ_HAVE_WINDOWS +#include "windows.hpp" +#endif + #include "msg.hpp" #include "../include/zmq.h" diff --git a/src/poller.hpp b/src/poller.hpp index b91e551c..4d66677a 100644 --- a/src/poller.hpp +++ b/src/poller.hpp @@ -32,6 +32,10 @@ #include "platform.hpp" +#ifdef ZMQ_HAVE_WINDOWS +#include "windows.hpp" +#endif + #if defined ZMQ_USE_KQUEUE + defined ZMQ_USE_EPOLL \ + defined ZMQ_USE_DEVPOLL + defined ZMQ_USE_POLL \ + defined ZMQ_USE_SELECT > 1 diff --git a/tests/test_security_curve.cpp b/tests/test_security_curve.cpp index 6c075978..d9db69ad 100644 --- a/tests/test_security_curve.cpp +++ b/tests/test_security_curve.cpp @@ -245,7 +245,11 @@ int main (void) ip4addr.sin_family = AF_INET; ip4addr.sin_port = htons (9998); - inet_pton (AF_INET, "127.0.0.1", &ip4addr.sin_addr); +#if (ZMQ_HAVE_WINDOWS and _WIN32_WINNT < 0x0600) + ip4addr.sin_addr.s_addr = inet_addr ("127.0.0.1"); +#else + inet_pton(AF_INET, "127.0.0.1", &ip4addr.sin_addr); +#endif s = socket (AF_INET, SOCK_STREAM, IPPROTO_TCP); rc = connect (s, (struct sockaddr*) &ip4addr, sizeof (ip4addr)); diff --git a/tests/test_security_null.cpp b/tests/test_security_null.cpp index e95a7c9d..f0ce6b55 100644 --- a/tests/test_security_null.cpp +++ b/tests/test_security_null.cpp @@ -158,7 +158,11 @@ int main (void) ip4addr.sin_family = AF_INET; ip4addr.sin_port = htons(9003); - inet_pton(AF_INET, "127.0.0.1", &ip4addr.sin_addr); +#if (ZMQ_HAVE_WINDOWS and _WIN32_WINNT < 0x0600) + ip4addr.sin_addr.s_addr = inet_addr ("127.0.0.1"); +#else + inet_pton(AF_INET, "127.0.0.1", &ip4addr.sin_addr); +#endif s = socket (AF_INET, SOCK_STREAM, IPPROTO_TCP); rc = connect (s, (struct sockaddr*) &ip4addr, sizeof ip4addr); diff --git a/tests/test_security_plain.cpp b/tests/test_security_plain.cpp index b76727fb..bfa0b7ed 100644 --- a/tests/test_security_plain.cpp +++ b/tests/test_security_plain.cpp @@ -164,7 +164,11 @@ int main (void) ip4addr.sin_family = AF_INET; ip4addr.sin_port = htons (9998); - inet_pton (AF_INET, "127.0.0.1", &ip4addr.sin_addr); +#if (ZMQ_HAVE_WINDOWS and _WIN32_WINNT < 0x0600) + ip4addr.sin_addr.s_addr = inet_addr ("127.0.0.1"); +#else + inet_pton(AF_INET, "127.0.0.1", &ip4addr.sin_addr); +#endif s = socket (AF_INET, SOCK_STREAM, IPPROTO_TCP); rc = connect (s, (struct sockaddr*) &ip4addr, sizeof (ip4addr));