--- a/tools/mesh-cfgtest.c
+++ b/tools/mesh-cfgtest.c
@@ -34,6 +34,8 @@
 #include "mesh/mesh-defs.h"
 #include "mesh/mesh.h"
 
+#include <limits.h>
+
 #define MAX_CRPL_SIZE	0x7fff
 #define CFG_SRV_MODEL	0x0000
 #define CFG_CLI_MODEL	0x0001
