--- a/m4/threadlib.m4
+++ b/m4/threadlib.m4
@@ -104,6 +104,9 @@
 #pragma weak fputs
 int main ()
 {
+#ifdef __CYGWIN__
+  return 1;
+#endif
   return (fputs == NULL);
 }]])],
          [gl_cv_have_weak=yes],
