Make sure the MIN() macro is defined.
authorEtienne Dechamps <etienne@edechamps.fr>
Sun, 17 May 2015 21:21:11 +0000 (22:21 +0100)
committerEtienne Dechamps <etienne@edechamps.fr>
Sun, 17 May 2015 21:21:11 +0000 (22:21 +0100)
On MinGW this is not automatically the case, thereby breaking the build.

src/meta.c
src/protocol_misc.c

index a05c7bd24f4239287e27254f6391a12dcbaa661e..260cb005051ff9cf6ab33473fe22d1e5a5308552 100644 (file)
 #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;
 
index 6e24274205bd10990bc49c4a1e49d1af4ac0b68d..de426c7896b02c65d3819d94d1108a172da2053a 100644 (file)
 #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;