Skip to content

Commit 85dff94

Browse files
committed
Fix for MinGW.
1 parent a579568 commit 85dff94

File tree

1 file changed

+20
-4
lines changed

1 file changed

+20
-4
lines changed

asio/include/asio/detail/socket_types.hpp

+20-4
Original file line numberDiff line numberDiff line change
@@ -248,10 +248,26 @@ typedef int signed_size_type;
248248
# define ASIO_OS_DEF_AI_CANONNAME AI_CANONNAME
249249
# define ASIO_OS_DEF_AI_PASSIVE AI_PASSIVE
250250
# define ASIO_OS_DEF_AI_NUMERICHOST AI_NUMERICHOST
251-
# define ASIO_OS_DEF_AI_NUMERICSERV AI_NUMERICSERV
252-
# define ASIO_OS_DEF_AI_V4MAPPED AI_V4MAPPED
253-
# define ASIO_OS_DEF_AI_ALL AI_ALL
254-
# define ASIO_OS_DEF_AI_ADDRCONFIG AI_ADDRCONFIG
251+
# if defined(AI_NUMERICSERV)
252+
# define ASIO_OS_DEF_AI_NUMERICSERV AI_NUMERICSERV
253+
# else
254+
# define ASIO_OS_DEF_AI_NUMERICSERV 0
255+
# endif
256+
# if defined(AI_V4MAPPED)
257+
# define ASIO_OS_DEF_AI_V4MAPPED AI_V4MAPPED
258+
# else
259+
# define ASIO_OS_DEF_AI_V4MAPPED 0
260+
# endif
261+
# if defined(AI_ALL)
262+
# define ASIO_OS_DEF_AI_ALL AI_ALL
263+
# else
264+
# define ASIO_OS_DEF_AI_ALL 0
265+
# endif
266+
# if defined(AI_ADDRCONFIG)
267+
# define ASIO_OS_DEF_AI_ADDRCONFIG AI_ADDRCONFIG
268+
# else
269+
# define ASIO_OS_DEF_AI_ADDRCONFIG 0
270+
# endif
255271
# if defined (_WIN32_WINNT)
256272
const int max_iov_len = 64;
257273
# else

0 commit comments

Comments
 (0)