diff --git a/wmake/src/wmkdep.l b/wmake/src/wmkdep.l
index d9d4b73591b6cefda555095fa61f300946cfcec6..3b6973209b562be4e06b7d7aa6296baa5fa501b5 100644
--- a/wmake/src/wmkdep.l
+++ b/wmake/src/wmkdep.l
@@ -46,6 +46,7 @@ Usage
 #include <string.h>
 #include <sys/types.h>
 #include <dirent.h>
+#include <errno.h>
 
 void nextFile(const char* fileName);
 void importFile(const char* fileName);