72e65b46创建于 2025年6月10日历史提交
Description: SCTP workaround for kfreebsd
 Freebsd has SCTP in the kernel but no sctp library is available,
 then iperf3 fails to compile because the lack of the library.
 .
 This patch moves the search for the library before kernel headers checks
 and of course it should be removed once Freebsd gets the library.
Author: Roberto Lumbreras <rover@debian.org>
Forwarded: no
Index: iperf3-3.18/configure.ac
===================================================================
--- iperf3-3.18.orig/configure.ac	2025-02-24 08:01:56.625356587 +0100
+++ iperf3-3.18/configure.ac	2025-02-24 08:01:56.621356659 +0100
@@ -136,9 +136,10 @@
 # Check for SCTP support
 if $try_sctp; then
 AC_CHECK_HEADERS([sys/socket.h])
+AC_SEARCH_LIBS(sctp_bindx, [sctp])
+if test "x$ac_cv_search_sctp_bindx" != "xno"; then
 AC_CHECK_HEADERS([netinet/sctp.h],
 		 AC_DEFINE([HAVE_SCTP_H], [1], [Have SCTP support.])
-		 AC_SEARCH_LIBS(sctp_bindx, [sctp])
 		 AC_CHECK_TYPES([struct sctp_assoc_value], [], [],
 				[[#include <netinet/sctp.h>]]),
 		 [],
@@ -147,6 +148,7 @@
 #endif
 ])
 fi
+fi
 
 AC_CHECK_HEADER([endian.h],
 		AC_DEFINE([HAVE_ENDIAN_H], [1], [Define to 1 if you have the <endian.h> header file.]),