And here's the patch inlined:
From 3e7486b8562fde1c291515eae22bf67b484a775f Mon Sep 17 00:00:00 2001
From: David Turner <digit@google.com>
Date: Thu, 11 Jun 2009 01:26:45 +0200
Subject: [PATCH] Fix the cygwin build by forcing the compiler to use the -mno-cygwin flag.
Without this change, all feature tests were run against the nearly-Posix
Cygwin headers, generating a config-host.h file that didn't correspond to
the features of the Mingw headers used at build time.
This resulted in errors when trying to include things like <sys/uio.h>
or <fnmatch.h> which are not available from Mingw.
Signed-off-by: David Turner <digit@google.com>
---
configure | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/configure b/configure
index 89e7f53..62ebd2e 100755
--- a/configure
+++ b/configure
@@ -215,7 +215,7 @@ fi
case $targetos in
CYGWIN*)
mingw32="yes"
-OS_CFLAGS="-mno-cygwin"
+cc="$cc -mno-cygwin"
if [ "$cpu" = "i386" ] ; then
kqemu="yes"
fi
--
1.6.1.2
And here comes a new patch to fix the Cygwin build: