1
0
Fork 0
mirror of https://repo.or.cz/socat.git synced 2025-05-21 20:52:40 +00:00

Fixes for FreeBSD-15 (DCCP)

This commit is contained in:
Gerhard 2025-02-17 20:32:06 +01:00
parent 48f3341d82
commit f0b30f3859
4 changed files with 32 additions and 12 deletions

View file

@ -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.

View file

@ -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

View file

@ -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)

View file

@ -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