0
0
mirror of https://github.com/zeromq/libzmq.git synced 2025-01-15 10:18:01 +08:00

Tests: Fix compilation on Windows

Visual Studio 2015 does grok the preprocessor defintion.
Add an explicit call to defined as done in other places.
This commit is contained in:
Thomas Braun 2016-08-22 20:57:28 +02:00
parent 64dbf56d6e
commit b86717dc9a
3 changed files with 3 additions and 3 deletions

View File

@ -245,7 +245,7 @@ int main (void)
ip4addr.sin_family = AF_INET;
ip4addr.sin_port = htons (9998);
#if (ZMQ_HAVE_WINDOWS and _WIN32_WINNT < 0x0600)
#if defined(ZMQ_HAVE_WINDOWS) && _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);

View File

@ -158,7 +158,7 @@ int main (void)
ip4addr.sin_family = AF_INET;
ip4addr.sin_port = htons(9003);
#if (ZMQ_HAVE_WINDOWS and _WIN32_WINNT < 0x0600)
#if defined(ZMQ_HAVE_WINDOWS) && _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);

View File

@ -164,7 +164,7 @@ int main (void)
ip4addr.sin_family = AF_INET;
ip4addr.sin_port = htons (9998);
#if (ZMQ_HAVE_WINDOWS and _WIN32_WINNT < 0x0600)
#if defined(ZMQ_HAVE_WINDOWS) && _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);