Network/Win32: Second patch for MinGW #157
Extending Mstcpip.h fix using C++17 feature __has_include
This commit is contained in:
parent
b93320613e
commit
3f7bac186b
|
|
@ -10,8 +10,12 @@
|
||||||
#include <Nazara/Network/Debug.hpp>
|
#include <Nazara/Network/Debug.hpp>
|
||||||
|
|
||||||
// some MinGW distributions seem to lack some defines
|
// some MinGW distributions seem to lack some defines
|
||||||
|
#ifndef ERROR_NOT_ENOUGH_MEMORY
|
||||||
|
#define ERROR_NOT_ENOUGH_MEMORY 8L
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef WSA_NOT_ENOUGH_MEMORY
|
#ifndef WSA_NOT_ENOUGH_MEMORY
|
||||||
#define WSA_NOT_ENOUGH_MEMORY 8L
|
#define WSA_NOT_ENOUGH_MEMORY (ERROR_NOT_ENOUGH_MEMORY)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace Nz
|
namespace Nz
|
||||||
|
|
|
||||||
|
|
@ -8,8 +8,8 @@
|
||||||
#include <Nazara/Core/MemoryHelper.hpp>
|
#include <Nazara/Core/MemoryHelper.hpp>
|
||||||
#include <Nazara/Network/Win32/IpAddressImpl.hpp>
|
#include <Nazara/Network/Win32/IpAddressImpl.hpp>
|
||||||
|
|
||||||
#if defined(NAZARA_COMPILER_MINGW) && __GNUC__ < 5
|
|
||||||
// Some compilers (olders versions of MinGW) are lacking Mstcpip.h which defines the following struct/#define
|
// Some compilers (olders versions of MinGW) are lacking Mstcpip.h which defines the following struct/#define
|
||||||
|
#if (defined(__has_include) && !__has_include(<Mstcpip.h>)) || (defined(NAZARA_COMPILER_MINGW) && !defined(__has_include))
|
||||||
struct tcp_keepalive
|
struct tcp_keepalive
|
||||||
{
|
{
|
||||||
u_long onoff;
|
u_long onoff;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue