From c71c9882c22a53c994469fe26b1e0511c4a403d6 Mon Sep 17 00:00:00 2001 From: goldsimon Date: Wed, 8 Mar 2017 20:30:48 +0100 Subject: [PATCH] arch.h: include if it exists (at least INT_MAX is used) (cherry picked from commit aff1935e409df720e004e6c83d81d50fbc4465d8) --- src/include/lwip/arch.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/include/lwip/arch.h b/src/include/lwip/arch.h index 884dccbc..55714e11 100644 --- a/src/include/lwip/arch.h +++ b/src/include/lwip/arch.h @@ -162,6 +162,19 @@ typedef uintptr_t mem_ptr_t; #endif #endif +/** Define this to 1 in arch/cc.h of your port if your compiler does not provide + * the limits.h header. You need to define the type limits yourself in this case + * (e.g. INT_MAX). + */ +#ifndef LWIP_NO_LIMITS_H +#define LWIP_NO_LIMITS_H 0 +#endif + +/* Include limits.h? */ +#if !LWIP_NO_LIMITS_H +#include +#endif + /** C++ const_cast(val) equivalent to remove constness from a value (GCC -Wcast-qual) */ #ifndef LWIP_CONST_CAST #define LWIP_CONST_CAST(target_type, val) ((target_type)((ptrdiff_t)val))