Problem: Usage of 'if_nametoindex' not supported in Windows XP.

Solution: Add ZMQ_HAVE_WINDOWS_TARGET_XP check to src/udp_address.cpp.
This commit is contained in:
aixxe 2019-07-25 19:38:49 +01:00
parent 69e451c1fa
commit 63409579e7
No known key found for this signature in database
GPG Key ID: 7914994A6A596F0A
2 changed files with 18 additions and 0 deletions

15
RELICENSE/aixxe.md Normal file
View File

@ -0,0 +1,15 @@
# Permission to Relicense under MPLv2 or any other OSI approved license chosen by the current ZeroMQ BDFL
This is a statement by aixxe (aixxe)
that grants permission to relicense his copyrights in the libzmq C++
library (ZeroMQ) under the Mozilla Public License v2 (MPLv2) or any other
Open Source Initiative approved license chosen by the current ZeroMQ
BDFL (Benevolent Dictator for Life).
A portion of the commits made by the Github handle "aixxe", with commit author
"aixxe <me@aixxe.net>" are copyright of aixxe.
This document hereby grants the libzmq project team to relicense libzmq,
including all past, present and future contributions of the author listed above.
aixxe
2019/07/25

View File

@ -104,11 +104,14 @@ int zmq::udp_address_t::resolve (const char *name_, bool bind_, bool ipv6_)
if (src_name == "*") { if (src_name == "*") {
_bind_interface = 0; _bind_interface = 0;
} else { } else {
#if !defined ZMQ_HAVE_WINDOWS_TARGET_XP && !defined ZMQ_HAVE_WINDOWS_UWP \
&& !defined ZMQ_HAVE_VXWORKS
_bind_interface = if_nametoindex (src_name.c_str ()); _bind_interface = if_nametoindex (src_name.c_str ());
if (_bind_interface == 0) { if (_bind_interface == 0) {
// Error, probably not an interface name. // Error, probably not an interface name.
_bind_interface = -1; _bind_interface = -1;
} }
#endif
} }
has_interface = true; has_interface = true;