Patch #404680: disables the nis module and enables the dl module when
    building under Cygwin.  Makes some fixes to the dlmodule in order to
    compile with Cygwin.
diff --git a/Modules/dlmodule.c b/Modules/dlmodule.c
index bb49a50..8c77133 100644
--- a/Modules/dlmodule.c
+++ b/Modules/dlmodule.c
@@ -134,7 +134,7 @@
 
 
 static PyTypeObject Dltype = {
-	PyObject_HEAD_INIT(&PyType_Type)
+	PyObject_HEAD_INIT(NULL)
 	0,			/*ob_size*/
 	"dl",			/*tp_name*/
 	sizeof(dlobject),	/*tp_basicsize*/
@@ -199,7 +199,7 @@
 	Py_XDECREF(v);
 }
 
-void
+DL_EXPORT(void)
 initdl(void)
 {
 	PyObject *m, *d, *x;
@@ -211,6 +211,9 @@
 		return;
 	}
 
+	/* Initialize object type */
+	Dltype.ob_type = &PyType_Type;
+
 	/* Create the module and add the functions */
 	m = Py_InitModule("dl", dl_methods);