summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton <anton@picapica>2019-03-08 20:02:47 +0400
committerAnton <anton@picapica>2019-03-08 20:02:47 +0400
commitd47f7d6c5c7769a7bc9716ec022dc6e9287d4ffc (patch)
treee175ee8c3e7f1a7acff75d0305658c33a29cde39
parent49bfb33e31ac316e3e5ab5ee8809bab9101b5dc9 (diff)
downloadpica-pica-d47f7d6c5c7769a7bc9716ec022dc6e9287d4ffc.tar.gz
pica-pica-d47f7d6c5c7769a7bc9716ec022dc6e9287d4ffc.zip
fix mingw-w64 cross-compile issues
-rw-r--r--PICA_client.h10
-rw-r--r--PICA_node.c5
-rw-r--r--pica-client/sound.cpp2
3 files changed, 16 insertions, 1 deletions
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 <winsock2.h>
#include <ws2tcpip.h>
#include <windows.h>
+#if defined(__MINGW32__) || defined(HAVE_STDINT_H)
+#include <stdint.h>
+#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 <stdint.h>
+#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 <windows.h>
-#include <Mmsystem.h>
+#include <mmsystem.h>
#endif