From 677f26f0f4f10d04308e6234b357788f987eb212 Mon Sep 17 00:00:00 2001
From: Zooko O'Whielacronx <zooko@zooko.com>
Date: Tue, 29 Jul 2008 20:16:56 -0700
Subject: [PATCH] setup: instead of setting --reactor=poll for trial in all
 cases (which fails on platforms that don't have poll reactor, such as Windows
 and some Mac OS X), just set --reactor=poll for linux2.

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

diff --git a/Makefile b/Makefile
index 0b3906a1..6f07e027 100644
--- a/Makefile
+++ b/Makefile
@@ -22,6 +22,13 @@ ifeq ($(PLAT),win32)
 	SRCPATH := $(shell cygpath -w $(shell pwd)/src)
 	INNOSETUP := $(shell cygpath -au "$(PROGRAMFILES)/Inno Setup 5/Compil32.exe")
 else
+	ifeq ($(PLAT),linux2)
+		# This is to work-around #402, and anyway the poll reactor is probably better on Linux, if
+		# we have a lot of open fds.
+		ifneq ($(REACTOR),)
+			REACTOR := poll
+		endif
+	endif
 	PYVER=$(shell $(PYTHON) misc/pyver.py)
 	SUPPORT = $(shell pwd)/support
 	SUPPORTLIB = $(SUPPORT)/lib/$(PYVER)/site-packages
-- 
2.45.2