From 314b92c0e37c6896ecabc391a4e1594fc86c2fdb Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sun, 28 Oct 2018 02:15:56 +0200 Subject: Fix build for mingw --- include/sibs/DirectConnection.hpp | 4 ++-- include/sibs/IpAddress.hpp | 16 +++++++++++----- 2 files changed, 13 insertions(+), 7 deletions(-) (limited to 'include/sibs') diff --git a/include/sibs/DirectConnection.hpp b/include/sibs/DirectConnection.hpp index 2137fd2..d96890b 100644 --- a/include/sibs/DirectConnection.hpp +++ b/include/sibs/DirectConnection.hpp @@ -25,8 +25,8 @@ namespace sibs enum class PubSubResult { - OK, - ERROR + RESULT_OK, + RESULT_ERROR }; struct DirectConnectionPeer; diff --git a/include/sibs/IpAddress.hpp b/include/sibs/IpAddress.hpp index 4403e83..54cb58a 100644 --- a/include/sibs/IpAddress.hpp +++ b/include/sibs/IpAddress.hpp @@ -3,12 +3,18 @@ #include #include #include -#ifndef WIN32 - #include - #include +#include "../env.hpp" +#if OS_FAMILY != OS_FAMILY_WINDOWS + #include + #include #else - #include - #include + #include + #include + int inet_pton(int af, const char *src, void *dst); + int inet_pton4(const char *src, void *dst); + int inet_pton6(const char *src, void *dst); + typedef u_short sa_family_t; + typedef uint32_t in_addr_t; #endif namespace sibs -- cgit v1.2.3