diff --git a/CHANGES b/CHANGES index 92995e6..26bdd28 100644 --- a/CHANGES +++ b/CHANGES @@ -140,6 +140,8 @@ Porting: OpenSSL-3 loudly deprecates some functions or macros, replace a first bunch of them. + Fixes for FreeBSD-15 (DCCP) + Testing: test.sh produces file results.txt with columns of test numbers, names, and results. diff --git a/config.h.in b/config.h.in index 39061f1..cd2fdeb 100644 --- a/config.h.in +++ b/config.h.in @@ -288,6 +288,9 @@ /* Define if you have the <linux/if_tun.h> header file. */ #undef HAVE_LINUX_IF_TUN_H +/* Define if you have the <netinet/dccp.h> header file. */ +#undef HAVE_NETINET_DCCP_H + /* Define if you have the <linux/dccp.h> header file. */ #undef HAVE_LINUX_DCCP_H diff --git a/configure.ac b/configure.ac index 3c5cc5b..f36a27b 100644 --- a/configure.ac +++ b/configure.ac @@ -409,21 +409,33 @@ AC_ARG_ENABLE(dccp, [ --disable-dccp disable DCCP support], [AC_MSG_RESULT(yes); WITH_DCCP=1 ]) if test -n "$WITH_DCCP"; then -AC_MSG_CHECKING(for IPPROTO_DCCP) -AC_CACHE_VAL(sc_cv_define_ipproto_dccp, -[AC_TRY_COMPILE([#include <sys/types.h> -#include <netinet/in.h>], -[IPPROTO_DCCP;], -[sc_cv_define_ipproto_dccp=yes], -[sc_cv_define_ipproto_dccp=no])]) -AC_MSG_RESULT($sc_cv_define_ipproto_dccp) -if test $sc_cv_define_ipproto_dccp = yes; then - AC_DEFINE(WITH_DCCP) + AC_CHECK_HEADER(netinet/dccp.h, + AC_DEFINE(HAVE_NETINET_DCCP_H)) AC_CHECK_HEADER(linux/dccp.h, AC_DEFINE(HAVE_LINUX_DCCP_H)) -else - AC_MSG_WARN([IPPROTO_DCCP undefined, disabling DCCP support]) fi +if test -n "$WITH_DCCP"; then + AC_MSG_CHECKING(for IPPROTO_DCCP) + AC_CACHE_VAL(sc_cv_define_ipproto_dccp, + [AC_TRY_COMPILE([#include <sys/types.h> + #include <netinet/in.h>], + [IPPROTO_DCCP;], + [sc_cv_define_ipproto_dccp=yes], + [sc_cv_define_ipproto_dccp=no; WITH_DCCP=])]) + AC_MSG_RESULT($sc_cv_define_ipproto_dccp) +fi +if test -n "$WITH_DCCP"; then + AC_MSG_CHECKING(for SOCK_DCCP) + AC_CACHE_VAL(sc_cv_define_sock_dccp, + [AC_TRY_COMPILE([#include <sys/types.h> + #include <netinet/in.h>], + [SOCK_DCCP;], + [sc_cv_define_sock_dccp=yes], + [sc_cv_define_sock_dccp=no; WITH_DCCP=])]) + AC_MSG_RESULT($sc_cv_define_sock_dccp) +fi +if test -n "$WITH_DCCP"; then + AC_DEFINE(WITH_DCCP) fi AC_MSG_CHECKING(whether to include vsock support) diff --git a/sysincludes.h b/sysincludes.h index 25a2309..a8e60be 100644 --- a/sysincludes.h +++ b/sysincludes.h @@ -150,6 +150,9 @@ #if HAVE_LINUX_IF_TUN_H #include <linux/if_tun.h> #endif +#if HAVE_NETINET_DCCP_H +#include <netinet/dccp.h> +#endif #if HAVE_LINUX_DCCP_H #include <linux/dccp.h> #endif