From a440ae7bd964f8d9f6cbf8a8b07098a4176ed3ec Mon Sep 17 00:00:00 2001 From: Gunar Schorcht Date: Thu, 25 Jun 2020 17:29:30 +0200 Subject: [PATCH] gnrc/icmpv6: redefinition of MIN macro Since `min(a,b)` is a very frequently used function, several libraries such as ESP8266 SDK define a `MIN` macro in their header files. Therefore the `MIN` macro should be undefined before its definition to avoid compilation errors if it is defined anywhere else before. --- sys/net/gnrc/network_layer/icmpv6/error/gnrc_icmpv6_error.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/net/gnrc/network_layer/icmpv6/error/gnrc_icmpv6_error.c b/sys/net/gnrc/network_layer/icmpv6/error/gnrc_icmpv6_error.c index d5a91c014e..60f5aaed23 100644 --- a/sys/net/gnrc/network_layer/icmpv6/error/gnrc_icmpv6_error.c +++ b/sys/net/gnrc/network_layer/icmpv6/error/gnrc_icmpv6_error.c @@ -27,6 +27,7 @@ #define ICMPV6_ERROR_SET_VALUE(data, value) \ ((icmpv6_error_pkt_too_big_t *)(data))->mtu = byteorder_htonl(value) +#undef MIN #define MIN(a, b) ((a) < (b)) ? (a) : (b) /**