1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-27 07:21:18 +01:00

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.
This commit is contained in:
Gunar Schorcht 2020-06-25 17:29:30 +02:00
parent a665fcc542
commit a440ae7bd9

View File

@ -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)
/**