--- a/libdocument/ev-document.c
+++ b/libdocument/ev-document.c
@@ -611,8 +611,12 @@ ev_document_load_fd (EvDocument *document,
                 return FALSE;
         }
 
+#ifndef G_OS_WIN32
         if (fstat(fd, &statbuf) == -1 ||
             (fd_flags = fcntl (fd, F_GETFL, &flags)) == -1) {
+#else
+        if (fstat(fd, &statbuf) == -1) {
+#endif
                 int errsv = errno;
                 g_set_error_literal (error, G_FILE_ERROR,
                                      g_file_error_from_errno (errsv),
