From: Etienne Dechamps Date: Sun, 17 May 2015 21:21:11 +0000 (+0100) Subject: Make sure the MIN() macro is defined. X-Git-Tag: release-1.1pre12~153 X-Git-Url: https://tinc-vpn.org/git/browse?a=commitdiff_plain;h=c1154bf696b0b3ad22126a76750d610e32e2ffc1;p=tinc Make sure the MIN() macro is defined. On MinGW this is not automatically the case, thereby breaking the build. --- diff --git a/src/meta.c b/src/meta.c index a05c7bd2..260cb005 100644 --- a/src/meta.c +++ b/src/meta.c @@ -30,6 +30,10 @@ #include "utils.h" #include "xalloc.h" +#ifndef MIN +#define MIN(x, y) (((x)<(y))?(x):(y)) +#endif + bool send_meta_sptps(void *handle, uint8_t type, const void *buffer, size_t length) { connection_t *c = handle; diff --git a/src/protocol_misc.c b/src/protocol_misc.c index 6e242742..de426c78 100644 --- a/src/protocol_misc.c +++ b/src/protocol_misc.c @@ -30,6 +30,10 @@ #include "utils.h" #include "xalloc.h" +#ifndef MIN +#define MIN(x, y) (((x)<(y))?(x):(y)) +#endif + int maxoutbufsize = 0; int mtu_info_interval = 5; int udp_info_interval = 5;