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 a05c7bd..260cb00 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 6e24274..de426c7 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;