--- a/include/libssh/libssh.h
+++ b/include/libssh/libssh.h
@@ -57,6 +57,7 @@
   typedef unsigned long long uint64_t;
   typedef int mode_t;
 #else /* _MSC_VER */
+  #include <sys/types.h>
   #include <unistd.h>
   #include <inttypes.h>
 #endif /* _MSC_VER */
