From d66d8236f6a3f673cfab96d52931a7d62669670c Mon Sep 17 00:00:00 2001 From: Petr Vanek Date: Sat, 31 Oct 2015 10:12:36 +0100 Subject: [PATCH] small changes for mingw64 --- README | 11 ++++++++++- artnet/artnet.h | 2 +- artnet/network.c | 2 +- artnet/private.h | 4 ++++ 4 files changed, 16 insertions(+), 3 deletions(-) diff --git a/README b/README index c89e6b7..2767c2b 100644 --- a/README +++ b/README @@ -2,4 +2,13 @@ Libartnet is an implementation of the ArtNet protocol. ArtNet allows the transmission of DMX and related data over IP networks. -For installation notes see the INSTALL file. +For installation notes see the INSTALL file. Run autoreconf -fi to create configure scripts. + +Building libartnet with mingw-w64: + +set up mingw-w64 (and possibly MSYS). + +for a 64-bit build: --host=x86_64-w64-mingw32 +for a 32-bit build: --host=i686-w64-mingw32 + +./configure ac_cv_func_malloc_0_nonnull=yes ac_cv_func_realloc_0_nonnull=yes --host=x86_64-w64-mingw32 --prefix=/some/path/prefix diff --git a/artnet/artnet.h b/artnet/artnet.h index c2f1c06..90dca02 100644 --- a/artnet/artnet.h +++ b/artnet/artnet.h @@ -28,7 +28,7 @@ #ifndef WIN32 #include #else -#include +#include typedef unsigned long in_addr_t; #endif diff --git a/artnet/network.c b/artnet/network.c index e0739e9..791f53c 100644 --- a/artnet/network.c +++ b/artnet/network.c @@ -28,7 +28,7 @@ #else typedef int socklen_t; #include -#include +#include #include #endif diff --git a/artnet/private.h b/artnet/private.h index 933fbef..6c4a538 100644 --- a/artnet/private.h +++ b/artnet/private.h @@ -445,7 +445,11 @@ typedef struct { * The main node structure */ typedef struct artnet_node_s{ + #ifdef WIN32 + SOCKET sd; + #else int sd; // the two sockets + #endif node_state_t state; // the state struct node_callbacks_t callbacks; // the callbacks struct struct ports_s {