1
0
Fork 0
mirror of https://repo.or.cz/socat.git synced 2025-06-10 19:46:51 +00:00

Fixes for old Scientific/RHEL

This commit is contained in:
Gerhard Rieger 2025-01-24 17:28:07 +01:00
parent 19d488a14f
commit 2439276651
4 changed files with 23 additions and 24 deletions

View file

@ -74,6 +74,8 @@ Porting:
Fixes for old Debian
Fixes for old Scientific/RHEL
Testing:
test.sh produces file results.txt with columns of test numbers, names,
and results.

View file

@ -659,23 +659,16 @@ if test -n "$WITH_OPENSSL"; then
AC_CACHE_VAL(sc_cv_have_openssl_ssl_h,
[AC_TRY_COMPILE([#include <openssl/ssl.h>],[;],
[sc_cv_have_openssl_ssl_h=yes; OPENSSL_BASE=""; ],
[sc_cv_have_openssl_ssl_h=no
if test "$OPENSSL_BASE"; then
Ds="$OPENSSL_BASE"
else
Ds="/sw /usr/local /opt/freeware /usr/sfw /usr/local/ssl"
fi
for D in $Ds; do
I="$D/include"
i="$I/openssl/ssl.h"
if test -r "$i"; then
#V_INCL="$V_INCL -I$I"
CPPFLAGS="$CPPFLAGS -I$I"
AC_MSG_NOTICE(found $i)
sc_cv_have_openssl_ssl_h=yes; OPENSSL_BASE="$D"
break;
fi
done])
[
# Another attempt to compile with OPENSSL_NO_KRB5
AC_MSG_NOTICE(trying with -DOPENSSL_NO_KRB5)
CFLAGS_ORIG="$CFLAGS"
CFLAGS="$CFLAGS -DOPENSSL_NO_KRB5"
AC_TRY_COMPILE([#include <openssl/ssl.h>],[;],
[sc_cv_have_openssl_ssl_h=yes],
[sc_cv_have_openssl_ssl_h=no
CFLAGS="$CFLAGS_ORIG"])
])
])
if test "$sc_cv_have_openssl_ssl_h" = "yes"; then
AC_DEFINE(HAVE_OPENSSL_SSL_H)
@ -2310,7 +2303,7 @@ int allow_severity,deny_severity;],[hosts_access(0)],
AC_TRY_LINK([#include <sys/types.h>
#include <tcpd.h>
int allow_severity,deny_severity;],[hosts_access(0)],
[sc_cv_have_libwrap='yes'],
[sc_cv_have_libwrap='yes'],
[sc_cv_have_libwrap='no'])
]
)

View file

@ -851,7 +851,7 @@ testod () {
# bash before version 3 aborts scripts that contain unquoted '=~'
# Therefore we create a shell script and quotedly fill it with '=~' for newer
# bashes
# bashes [regexp regular expressions]
mkdir -p $td/bin
rm -f $td/bin/re_match
if [ "${BASH_VERSION%%[.]*}" -le 2 ]; then
@ -1886,7 +1886,7 @@ waitudp6port () {
fi ;;
FreeBSD) l=$(netstat -an |$GREP_E '^udp(6|46) .*[0-9*]\.'$port' .* \*\.\*') ;;
NetBSD) l=$(netstat -an |grep '^udp6 .* \*\.'$port' [ ]* \*\.\*') ;;
OpenBSD) l=$(netstat -an |grep '^udp6 .*[0-9*]\.'$port' [ ]* \*\.\*') ;;
OpenBSD) l=$(netstat -an |grep '^udp6 .*[0-9*]\.'$port' [ ]* \*\.\*') ;;
Darwin) l=$(netstat -an |$GREP_E '^udp4?6 +[0-9]+ +[0-9]+ +[0-9a-z:%*]+\.'$port' +[0-9a-z:%*.]+') ;;
AIX) l=$(netstat -an |grep '^udp[6 ] 0 0 .*[*0-9]\.'$port' .* \*\.\*[ ]*$') ;;
SunOS) l=$(netstat -an -f inet6 -P udp |grep '.*[1-9*]\.'$port' [ ]*Idle') ;;

View file

@ -902,16 +902,20 @@ int xiolog_ancillary_ip(
'\0',
inet4addr_info(ntohl(pktinfo->ipi_addr.s_addr),
scratch3, sizeof(scratch3)));
#if HAVE_PKTINFO_IPI_SPEC_DST
Notice3("Ancillary message: interface \"%s\", locaddr=%s, dstaddr=%s",
xiogetifname(pktinfo->ipi_ifindex, scratch1, -1),
#if HAVE_PKTINFO_IPI_SPEC_DST
inet4addr_info(ntohl(pktinfo->ipi_spec_dst.s_addr),
scratch2, sizeof(scratch2)),
#else
"",
#endif
inet4addr_info(ntohl(pktinfo->ipi_addr.s_addr),
scratch3, sizeof(scratch3)));
#else
Notice3("Ancillary message: interface \"%s\", locaddr=%s, dstaddr=%s",
xiogetifname(pktinfo->ipi_ifindex, scratch1, -1),
"",
inet4addr_info(ntohl(pktinfo->ipi_addr.s_addr),
scratch3, sizeof(scratch3)));
#endif
}
return STAT_OK;
#endif /* defined(IP_PKTINFO) && HAVE_STRUCT_IN_PKTINFO */