about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2015-02-06 22:31:24 +0000
committerEric Wong <e@80x24.org>2015-04-22 18:57:25 +0000
commit030b17f4e10fb847f39f6bdadfaf036f2a7d9ea4 (patch)
treefef6e4e7b922c64e109354945a04cfd909da7c61
parentdac42b86497e98d5f184d4c40ddc4ca718383403 (diff)
downloadunicorn-030b17f4e10fb847f39f6bdadfaf036f2a7d9ea4.tar.gz
Older Rubies (2.0) may not define SO_REUSEPORT even if the
kernel and libc support it
-rw-r--r--test/unit/test_socket_helper.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/unit/test_socket_helper.rb b/test/unit/test_socket_helper.rb
index 7722049..09d65af 100644
--- a/test/unit/test_socket_helper.rb
+++ b/test/unit/test_socket_helper.rb
@@ -193,5 +193,5 @@ class TestSocketHelper < Test::Unit::TestCase
     assert_operator cur, :>, 0
   rescue Errno::ENOPROTOOPT
     # kernel does not support SO_REUSEPORT (older Linux)
-  end
+  end if defined?(Socket::SO_REUSEPORT)
 end