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-02-06 22:31:24 +0000
commita46799b231080033320c5eb613baec59e906a8c2 (patch)
tree562188124a785a239c7c82f53cafa3fd38670a79
parent079a23e4f868e6615762efcc711cbf86d95876ef (diff)
downloadunicorn-a46799b231080033320c5eb613baec59e906a8c2.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 8b09198..7526e82 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