Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
L
libzmq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
libzmq
Commits
a7922e5f
Commit
a7922e5f
authored
Mar 31, 2016
by
Constantin Rack
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1880 from MatthewPowley/fix-windows-xp-compatability
Windows XP compatability fixes
parents
dac5b45d
f2018ab3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
0 deletions
+18
-0
Common.props
builds/msvc/properties/Common.props
+8
-0
tcp_address.cpp
src/tcp_address.cpp
+10
-0
No files found.
builds/msvc/properties/Common.props
View file @
a7922e5f
...
...
@@ -18,4 +18,11 @@
</ClCompile>
</ItemDefinitionGroup>
<!-- When using a tool set to target Windows XP, define a pre-processor definition and modify the target Windows version -->
<ItemDefinitionGroup
Condition=
"$(PlatformToolset.Contains('_xp'))"
>
<ClCompile>
<PreprocessorDefinitions>
ZMQ_HAVE_WINDOWS_TARGET_XP;_WIN32_WINNT=0x0501;%(PreprocessorDefinitions)
</PreprocessorDefinitions>
</ClCompile>
</ItemDefinitionGroup>
</Project>
\ No newline at end of file
src/tcp_address.cpp
View file @
a7922e5f
...
...
@@ -450,13 +450,23 @@ int zmq::tcp_address_t::resolve (const char *name_, bool local_, bool ipv6_, boo
std
::
string
if_str
=
addr_str
.
substr
(
pos
+
1
);
addr_str
=
addr_str
.
substr
(
0
,
pos
);
if
(
isalpha
(
if_str
.
at
(
0
)))
#if !defined ZMQ_HAVE_WINDOWS_TARGET_XP
zone_id
=
if_nametoindex
(
if_str
.
c_str
());
#else
// The function 'if_nametoindex' is not supported on Windows XP.
// If we are targeting XP using a vxxx_xp toolset then fail.
// This is brutal as this code could be run on later windows clients
// meaning the IPv6 zone_id cannot have an interface name.
// This could be fixed with a runtime check.
zone_id
=
0
;
#endif
else
zone_id
=
(
uint32_t
)
atoi
(
if_str
.
c_str
());
if
(
zone_id
==
0
)
{
errno
=
EINVAL
;
return
-
1
;
}
}
// Allow 0 specifically, to detect invalid port error in atoi if not
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment