Merge pull request #4264 from analogist/master

mingw-w64 10.3 build fix - winsock socket() return unsigned
This commit is contained in:
Luca Boccassi 2021-09-25 11:31:27 +01:00 committed by GitHub
commit 5d8d857540
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 23 additions and 0 deletions

15
RELICENSE/analogist.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 James Wu
that grants permission to relicense its 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 "analogist", with
commit author "James Wu <james@analogist.net>", are copyright of James Wu.
This document hereby grants the libzmq project team to relicense libzmq,
including all past, present and future contributions of the author listed above.
James Wu
2020/09/24

View File

@ -386,7 +386,11 @@ fd_t connect_socket (const char *endpoint_, const int af_, const int protocol_)
protocol_ == IPPROTO_UDP ? IPPROTO_UDP
: protocol_ == IPPROTO_TCP ? IPPROTO_TCP
: 0);
#ifdef ZMQ_HAVE_WINDOWS
TEST_ASSERT_NOT_EQUAL (INVALID_SOCKET, s_pre);
#else
TEST_ASSERT_NOT_EQUAL (-1, s_pre);
#endif
if (af_ == AF_INET || af_ == AF_INET6) {
const char *port = strrchr (endpoint_, ':') + 1;
@ -443,7 +447,11 @@ fd_t bind_socket_resolve_port (const char *address_,
protocol_ == IPPROTO_UDP ? IPPROTO_UDP
: protocol_ == IPPROTO_TCP ? IPPROTO_TCP
: 0);
#ifdef ZMQ_HAVE_WINDOWS
TEST_ASSERT_NOT_EQUAL (INVALID_SOCKET, s_pre);
#else
TEST_ASSERT_NOT_EQUAL (-1, s_pre);
#endif
if (af_ == AF_INET || af_ == AF_INET6) {
#ifdef ZMQ_HAVE_WINDOWS