Merge pull request #1775 from CommanderBubble/patch-2

updates for bumped _WIN32_WINNT version with mingw builds
This commit is contained in:
Pieter Hintjens
2016-02-06 13:56:45 +01:00
11 changed files with 35 additions and 14 deletions

View File

@@ -29,6 +29,12 @@
#include <string.h>
#include "platform.hpp"
#ifdef ZMQ_HAVE_WINDOWS
#include "windows.hpp"
#endif
#include "../include/zmq.h"
#include "macros.hpp"
#include "dish.hpp"

View File

@@ -28,7 +28,6 @@
*/
#include "err.hpp"
#include "platform.hpp"
const char *zmq::errno_to_string (int errno_)
{

View File

@@ -41,10 +41,6 @@
#include <stdio.h>
#include "platform.hpp"
#include "likely.hpp"
// 0MQ-specific error codes are defined in zmq.h
#include "../include/zmq.h"
#ifdef ZMQ_HAVE_WINDOWS
#include "windows.hpp"
@@ -52,6 +48,11 @@
#include <netdb.h>
#endif
#include "likely.hpp"
// 0MQ-specific error codes are defined in zmq.h
#include "../include/zmq.h"
// EPROTO is not used by OpenBSD and maybe other platforms.
#ifndef EPROTO
#define EPROTO 0

View File

@@ -434,7 +434,7 @@ bool zmq::select_t::is_retired_fd (const fd_entry_t &entry)
#if defined ZMQ_HAVE_WINDOWS
u_short zmq::select_t::get_fd_family (fd_t fd_)
{
sockaddr addr{ 0 };
sockaddr addr = { 0 };
int addr_size = sizeof addr;
int rc = getsockname (fd_, &addr, &addr_size);

View File

@@ -44,10 +44,10 @@
#ifdef __MINGW32__
// Require Windows XP or higher with MinGW for getaddrinfo().
#if(_WIN32_WINNT >= 0x0501)
#if(_WIN32_WINNT >= 0x0600)
#else
#undef _WIN32_WINNT
#define _WIN32_WINNT 0x0501
#define _WIN32_WINNT 0x0600
#endif
#endif