diff --git a/git-compat-util.h b/git-compat-util.h
index 5c596875c..a979e41c1 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -96,6 +96,7 @@
 #include <sys/poll.h>
 #include <sys/socket.h>
 #include <sys/ioctl.h>
+#include <termios.h>
 #ifndef NO_SYS_SELECT_H
 #include <sys/select.h>
 #endif