fix_have_windows.patch raw
1 This fixes several instances where _MSC_VER was
2 used to determine whether to use afunix.h or not.
3
4 See https://github.com/zeromq/libzmq/pull/4678.
5 --- a/src/ipc_address.hpp
6 +++ b/src/ipc_address.hpp
7 @@ -7,7 +7,7 @@
8
9 #include <string>
10
11 -#if defined _MSC_VER
12 +#if defined ZMQ_HAVE_WINDOWS
13 #include <afunix.h>
14 #else
15 #include <sys/socket.h>
16 diff --git a/src/ipc_connecter.cpp b/src/ipc_connecter.cpp
17 index 3f988745..ed2a0645 100644
18 --- a/src/ipc_connecter.cpp
19 +++ b/src/ipc_connecter.cpp
20 @@ -16,7 +16,7 @@
21 #include "ipc_address.hpp"
22 #include "session_base.hpp"
23
24 -#ifdef _MSC_VER
25 +#if defined ZMQ_HAVE_WINDOWS
26 #include <afunix.h>
27 #else
28 #include <unistd.h>
29 diff --git a/src/ipc_listener.cpp b/src/ipc_listener.cpp
30 index 50126040..5428579b 100644
31 --- a/src/ipc_listener.cpp
32 +++ b/src/ipc_listener.cpp
33 @@ -17,7 +17,7 @@
34 #include "socket_base.hpp"
35 #include "address.hpp"
36
37 -#ifdef _MSC_VER
38 +#ifdef ZMQ_HAVE_WINDOWS
39 #ifdef ZMQ_IOTHREAD_POLLER_USE_SELECT
40 #error On Windows, IPC does not work with POLLER=select, use POLLER=epoll instead, or disable IPC transport
41 #endif
42 diff --git a/tests/testutil.cpp b/tests/testutil.cpp
43 index bdc80283..6f21e8f6 100644
44 --- a/tests/testutil.cpp
45 +++ b/tests/testutil.cpp
46 @@ -7,7 +7,7 @@
47
48 #if defined _WIN32
49 #include "../src/windows.hpp"
50 -#if defined _MSC_VER
51 +#if defined ZMQ_HAVE_WINDOWS
52 #if defined ZMQ_HAVE_IPC
53 #include <direct.h>
54 #include <afunix.h>
55