diff --git a/src/utils.c b/src/utils.c
index ce8ca264..05656666 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -64,8 +64,10 @@ as that of the covered work.  */
 #include <sys/stat.h>
 
 /* For TIOCGWINSZ and friends: */
-#include <sys/ioctl.h>
-#include <termios.h>
+#ifndef WINDOWS
+# include <sys/ioctl.h>
+# include <termios.h>
+#endif
 
 /* Needed for Unix version of run_with_timeout. */
 #include <signal.h>