From 8aab91115aa65e684616b5953553e48877d63044 Mon Sep 17 00:00:00 2001
From: Zooko O'Whielacronx <zooko@zooko.com>
Date: Wed, 30 Jul 2008 11:12:17 -0700
Subject: [PATCH] setup: turn back on reactor=poll for cygwin trial (else it
 runs out of fds)

---
 Makefile | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/Makefile b/Makefile
index 682db2ff..328844c6 100644
--- a/Makefile
+++ b/Makefile
@@ -29,6 +29,13 @@ else
 			REACTOR := poll
 		endif
 	endif
+	ifeq ($(PLAT),cygwin)
+		# The cygwin select reactor seems to run out of fds in unit tests -- it writes "filedescriptor
+		# out of range in select()".  Setting reactor=poll fixes that.
+		ifeq ($(REACTOR),)
+			REACTOR := poll
+		endif
+	endif
 	PYVER=$(shell $(PYTHON) misc/pyver.py)
 	SUPPORT = $(shell pwd)/support
 	SUPPORTLIB = $(SUPPORT)/lib/$(PYVER)/site-packages
-- 
2.45.2