MSVC compatibility fixes.
diff --git a/files/file.c b/files/file.c
index 64b78b3..f962cec 100644
--- a/files/file.c
+++ b/files/file.c
@@ -44,12 +44,16 @@
#ifdef HAVE_SYS_TIME_H
# include <sys/time.h>
#endif
-#include <sys/poll.h>
+#ifdef HAVE_SYS_POLL_H
+# include <sys/poll.h>
+#endif
#include <time.h>
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
-#include <utime.h>
+#ifdef HAVE_UTIME_H
+# include <utime.h>
+#endif
#include "winerror.h"
#include "windef.h"
diff --git a/files/smb.c b/files/smb.c
index b84096d..9624c5e 100644
--- a/files/smb.c
+++ b/files/smb.c
@@ -74,12 +74,16 @@
#ifdef HAVE_SYS_TIME_H
# include <sys/time.h>
#endif
-#include <sys/poll.h>
+#ifdef HAVE_SYS_POLL_H
+# include <sys/poll.h>
+#endif
#include <time.h>
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
-#include <utime.h>
+#ifdef HAVE_UTIME_H
+# include <utime.h>
+#endif
#ifdef HAVE_SYS_SOCKET_H
# include <sys/socket.h>
#endif