From 736ce20a34ebe66fc2adc97e1f991de3f825e6e6 Mon Sep 17 00:00:00 2001
From: Ingela Anderton Andin <ingela@erlang.org>
Date: Mon, 5 Sep 2016 17:50:07 +0200
Subject: diameter: Do not test SCTP on sparc-sun-solaris2.10

The SCPT stack has a different behavior in solaris2.10 then in later versions
and linux. Diameter implementation does not support this behavior.
---
 lib/diameter/test/diameter_util.erl | 22 +++++++++++++++-------
 1 file changed, 15 insertions(+), 7 deletions(-)

diff --git a/lib/diameter/test/diameter_util.erl b/lib/diameter/test/diameter_util.erl
index 37fcbbc267..cca28dd23c 100644
--- a/lib/diameter/test/diameter_util.erl
+++ b/lib/diameter/test/diameter_util.erl
@@ -195,13 +195,21 @@ unique_string() ->
 %% have_sctp/0
 
 have_sctp() ->
-    case gen_sctp:open() of
-        {ok, Sock} ->
-            gen_sctp:close(Sock),
-            true;
-        {error, E} when E == eprotonosupport;
-                        E == esocktnosupport -> %% fail on any other reason
-            false
+    case erlang:system_info(system_architecture) of
+	%% We do not support the sctp version present in solaris
+	%% version "sparc-sun-solaris2.10", that behaves differently
+	%% from later versions and linux
+	"sparc-sun-solaris2.10" ->
+	    false;
+	_->
+	    case gen_sctp:open() of
+		{ok, Sock} ->
+		    gen_sctp:close(Sock),
+		    true;
+		{error, E} when E == eprotonosupport;
+				E == esocktnosupport -> %% fail on any other reason
+		    false
+	    end
     end.
 
 %% ---------------------------------------------------------------------------
-- 
cgit v1.2.3