From d47f7d6c5c7769a7bc9716ec022dc6e9287d4ffc Mon Sep 17 00:00:00 2001 From: Anton Date: Fri, 8 Mar 2019 20:02:47 +0400 Subject: fix mingw-w64 cross-compile issues --- PICA_client.h | 10 ++++++++++ PICA_node.c | 5 +++++ pica-client/sound.cpp | 2 +- 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/PICA_client.h b/PICA_client.h index ba575c3..ec013fa 100644 --- a/PICA_client.h +++ b/PICA_client.h @@ -24,12 +24,22 @@ #ifdef WIN32 +#define NOCRYPT #include #include #include +#if defined(__MINGW32__) || defined(HAVE_STDINT_H) +#include +#else +typedef unsigned __int8 uint8_t; +typedef unsigned __int32 uint32_t; typedef unsigned __int16 uint16_t; typedef unsigned __int64 uint64_t; +#endif + +typedef u_long in_addr_t; +typedef u_short in_port_t; #else diff --git a/PICA_node.c b/PICA_node.c index 2261e5b..7a62001 100644 --- a/PICA_node.c +++ b/PICA_node.c @@ -40,6 +40,11 @@ #endif #ifdef WIN32 + +#ifdef __MINGW32__ +#include +#endif + typedef u_long in_addr_t; typedef u_short in_port_t; typedef u_short uint16_t; diff --git a/pica-client/sound.cpp b/pica-client/sound.cpp index 08294bc..1ef9be6 100644 --- a/pica-client/sound.cpp +++ b/pica-client/sound.cpp @@ -25,7 +25,7 @@ //link with winmm.lib #include -#include +#include #endif -- cgit v1.2.1