--- a/extern.h
+++ b/extern.h
@@ -17,6 +17,8 @@
 #ifndef EXTERN_H
 #define EXTERN_H
 
+#include <stdint.h>
+
 #if !HAVE_PLEDGE
 # define pledge(x, y) (1)
 #endif
