This fixes building the signal module on Cygwin, where the si_band member
of the siginfo_t struct is not present as expected by Python.  This has been
fixed upstream for Python 3.7; see https://bugs.python.org/issue21085
diff --git a/Modules/signalmodule.c b/Modules/signalmodule.c
index 753d987..c69c0ce 100644
--- a/Modules/signalmodule.c
+++ b/Modules/signalmodule.c
@@ -957,7 +957,11 @@ fill_siginfo(siginfo_t *si)
     PyStructSequence_SET_ITEM(result, 4, _PyLong_FromUid(si->si_uid));
     PyStructSequence_SET_ITEM(result, 5,
                                 PyLong_FromLong((long)(si->si_status)));
+#ifdef HAVE_SIGINFO_T_SI_BAND
     PyStructSequence_SET_ITEM(result, 6, PyLong_FromLong(si->si_band));
+#else
+    PyStructSequence_SET_ITEM(result, 6, PyLong_FromLong(0L));
+#endif
     if (PyErr_Occurred()) {
         Py_DECREF(result);
         return NULL;
diff --git a/configure b/configure
index 2fbe259..8281f95 100755
@@ -12750,6 +12750,18 @@
 fi
 
 
+# Issue #21085: In Cygwin, siginfo_t does not have si_band field.
+ac_fn_c_check_member "$LINENO" "siginfo_t" "si_band" "ac_cv_member_siginfo_t_si_band" "#include <signal.h>
+"
+if test "x$ac_cv_member_siginfo_t_si_band" = xyes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_SIGINFO_T_SI_BAND 1
+_ACEOF
+
+
+fi
+
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
 $as_echo_n "checking for time.h that defines altzone... " >&6; }
diff --git a/configure.ac b/configure.ac
index 9eacf52..b4da665 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3943,6 +3943,8 @@ AC_CHECK_MEMBERS([struct passwd.pw_gecos, struct passwd.pw_passwd], [], [], [[
   #include <sys/types.h>
   #include <pwd.h>
 ]])
+# Issue #21085: In Cygwin, siginfo_t does not have si_band field.
+AC_CHECK_MEMBERS([siginfo_t.si_band], [], [], [[#include <signal.h>]])
 
 AC_MSG_CHECKING(for time.h that defines altzone)
 AC_CACHE_VAL(ac_cv_header_time_altzone,[
diff --git a/pyconfig.h.in b/pyconfig.h.in
index 6304a8e..eda0cf9 100644
--- a/pyconfig.h.in
+++ b/pyconfig.h.in
@@ -856,6 +856,9 @@
 /* Define to 1 if you have the `sigaltstack' function. */
 #undef HAVE_SIGALTSTACK
 
+/* Define to 1 if `si_band' is a member of `siginfo_t'. */
+#undef HAVE_SIGINFO_T_SI_BAND
+
 /* Define to 1 if you have the `siginterrupt' function. */
 #undef HAVE_SIGINTERRUPT
 
