1
0
mirror of https://github.com/moparisthebest/socat synced 2024-12-21 22:48:48 -05:00

check if define __APPLE_USE_RFC_2292 helps to enable IPV6_*

This commit is contained in:
Gerhard Rieger 2011-11-22 13:20:02 +01:00
parent baa16a52a6
commit b4b7ffc732
3 changed files with 34 additions and 6 deletions

View File

@ -71,6 +71,10 @@ porting:
IPV6_PKTINFO IPV6_RTHDR IPV6_DSTOPTS IPV6_HOPOPTS IPV6_HOPLIMIT
Thanks to Jerry Jacobs for reporting this problem (Mac OS X Lion 10.7)
check if define __APPLE_USE_RFC_2292 helps to enable IPV6_* (MacOSX
Lion 7.1); thanks to Jerry Jacobs to reporting this problem and
proposing a solution
####################### V 1.7.1.3:
security:

View File

@ -64,7 +64,6 @@ AC_CHECK_HEADERS(netinet/ip.h, [], [], [AC_INCLUDES_DEFAULT
#include <netinet/in_systm.h>
#endif]) # Solaris prerequisites for netinet/ip.h
AC_CHECK_HEADERS(netinet/tcp.h)
AC_CHECK_HEADERS(netinet6/in6.h) # found on OpenBSD, used for IPV6_*
AC_CHECK_HEADER(net/if.h, [], [], [AC_INCLUDES_DEFAULT
#if HAVE_SYS_SOCKET_H
#include <sys/socket.h>
@ -215,6 +214,27 @@ if test "$WITH_IP6"; then
#ifdef HAVE_NETINET_IN_H
# include <netinet/in.h>
#endif])
AC_CHECK_HEADERS(netinet6/in6.h) # found on OpenBSD and Lion, used for IPV6_*
AC_MSG_CHECKING(if __APPLE_USE_RFC_2292 is helpful)
AC_CACHE_VAL(ac_cv_apple_use_rfc_2292,
[AC_TRY_COMPILE(,[#ifndef IPV6_HOPOPTS
murks;
#endif],
[ac_cv_apple_use_rfc_2292=no],
[AC_TRY_COMPILE([#define __APPLE_USE_RFC_2292],
[#ifndef IPV6_HOPOPTS
murks;
#endif],
[ac_cv_apple_use_rfc_2292=yes],
[ac_cv_apple_use_rfc_2292=no]
)]
)])
if test "$ac_cv_apple_use_rfc_2292" = yes; then
AC_DEFINE(__APPLE_USE_RFC_2292)
fi
AC_MSG_RESULT($ac_cv_apple_use_rfc_2292)
fi
AC_MSG_CHECKING(whether to include raw IP support)

14
test.sh
View File

@ -3396,7 +3396,7 @@ wait
fi ;; # NUMCOND
esac
N=$((N+1))
set +vx
#set +vx
NAME=EXECIGNOREEOF
@ -7540,6 +7540,7 @@ pid3=$!
waittcp4port $p2 1
$CMD 2>"${te}2" &
pid2=$!
usleep $MICROS
waittcp4port $p1 1
echo "$da1a" |$CMD1 2>>"${te}1a"
echo "$da1b" |$CMD1 2>>"${te}1b"
@ -8767,7 +8768,7 @@ fi ;; # NUMCOND
esac
PORT=$((PORT+1))
N=$((N+1))
set +vx
#set +vx
# there was a bug with udp-recvfrom and fork: terminating sub processes became
# zombies because the master process caught SIGCHLD but did not wait()
@ -9147,6 +9148,9 @@ elif [ "$ROOT" = root -a $(id -u) -ne 0 -a "$withroot" -eq 0 ]; then
elif [ "$PF" = "IP6" ] && ( ! feat=$(testaddrs ip6) || ! runsip6 >/dev/null ); then
$PRINTF "test $F_n $TEST... ${YELLOW}IP6 not available${NORMAL}\n" $N
numCANT=$((numCANT+1))
elif ! testoptions $SCM_RECV >/dev/null; then
$PRINTF "test $F_n $TEST... ${YELLOW}option $SCM_RECV not available${NORMAL}\n" $N
numCANT=$((numCANT+1))
else
tf="$td/test$N.stdout"
te="$td/test$N.stderr"
@ -9205,7 +9209,7 @@ else
fi
numOK=$((numOK+1))
fi
set +vx
#set +vx
else # option is not supported
$PRINTF "${YELLOW}$SCM_RECV not available${NORMAL}\n"
numCANT=$((numCANT+1))
@ -9332,7 +9336,7 @@ fi # NUMCOND, feats
;;
esac
N=$((N+1))
set +xv
#set +xv
#
done <<<"
TCP4 TCP $LOCALHOST $SECONDADDR $PORT $((PORT+1))
@ -9424,7 +9428,7 @@ else
fi
numOK=$((numOK+1))
fi
set +vx
#set +vx
else # option is not supported
$PRINTF "${YELLOW}$SCM_RECV not available${NORMAL}\n"
numCANT=$((numCANT+1))