File 0240-Make-erts-configure-fail-if-sctp-support-request-can.patch of Package erlang

From 9ce3bcd57af647d2883700aadd761086e8852fda Mon Sep 17 00:00:00 2001
From: Rickard Green <rickard@erlang.org>
Date: Fri, 5 Mar 2021 11:36:28 +0100
Subject: [PATCH 1/3] Make erts configure fail if sctp support request cannot
 be satisfied

---
 erts/configure.in | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/erts/configure.in b/erts/configure.in
index 418a111922..fd3190f0f1 100644
--- a/erts/configure.in
+++ b/erts/configure.in
@@ -1774,6 +1774,15 @@ if test "x$enable_sctp" != "xno" ; then
 	])
 fi
 
+case "x$enable_sctp" in
+     xno|x)
+	;;
+     *)
+	if test "x$LIBSCTP" = "x" ; then
+	   AC_MSG_ERROR([sctp support requested, but cannot be enabled since 'netinet/sctp.h' is missing])
+	fi;;
+esac
+
 if test x"$ac_cv_header_netinet_sctp_h" = x"yes"; then
     AS_IF([test "x$enable_sctp" = "xlib"],
         AC_CHECK_LIB(sctp, sctp_bindx))
-- 
2.26.2

openSUSE Build Service is sponsored by