diff --git a/src/helper/types.h b/src/helper/types.h
index 75b2ad1b863bdcc3b860896fd7dfe19b77339996..11b97f61e9f0b8f9b488b2732ac0ae10006602fd 100644
--- a/src/helper/types.h
+++ b/src/helper/types.h
@@ -26,7 +26,9 @@
 #ifdef HAVE_SYS_TYPES_H
 #include <sys/types.h>
 #endif
+#ifdef HAVE_STDINT_H
 #include <stdint.h>
+#endif
 
 typedef struct jtag_tap_s jtag_tap_t;