diff --git a/cores/esp32/WString.h b/cores/esp32/WString.h
index 11b12aa08a5..98055c6e7a4 100644
--- a/cores/esp32/WString.h
+++ b/cores/esp32/WString.h
@@ -27,6 +27,7 @@
 #include <string.h>
 #include <ctype.h>
 #include <pgmspace.h>
+#include <stdint.h>
 
 // An inherited class for holding the result of a concatenation.  These
 // result objects are assumed to be writable by subsequent concatenations.