fix libnet build on osx
[openwrt/svn-archive/archive.git] / libs / libnet-1.1.x / patches / 150-portability.patch
1 diff -ur libnet.old/configure libnet.dev/configure
2 --- libnet.old/configure 2007-04-01 17:48:16.000000000 +0200
3 +++ libnet.dev/configure 2007-04-01 18:43:46.000000000 +0200
4 @@ -19537,7 +19537,15 @@
5 echo "$as_me:$LINENO: checking link-layer packet interface type" >&5
6 echo $ECHO_N "checking link-layer packet interface type... $ECHO_C" >&6
7
8 -if test -r /dev/bpf0 ; then
9 +if test -n "$LL_INT_TYPE"; then
10 + case $LIBOBJS in
11 + "libnet_link_$LL_INT_TYPE.$ac_objext" | \
12 + *" libnet_link_$LL_INT_TYPE.$ac_objext" | \
13 + "libnet_link_$LL_INT_TYPE.$ac_objext "* | \
14 + *" libnet_link_$LL_INT_TYPE.$ac_objext "* ) ;;
15 + *) LIBOBJS="$LIBOBJS libnet_link_$LL_INT_TYPE.$ac_objext" ;;
16 +esac
17 +elif test -r /dev/bpf0 ; then
18 case $LIBOBJS in
19 "libnet_link_bpf.$ac_objext" | \
20 *" libnet_link_bpf.$ac_objext" | \
21 diff -ur libnet.old/configure.in libnet.dev/configure.in
22 --- libnet.old/configure.in 2007-04-01 17:48:16.000000000 +0200
23 +++ libnet.dev/configure.in 2007-04-01 18:44:29.000000000 +0200
24 @@ -67,7 +67,10 @@
25 dnl
26 AC_MSG_CHECKING(link-layer packet interface type)
27
28 -if test -r /dev/bpf0 ; then
29 +if test -n "$LL_INT_TYPE"; then
30 + AC_LIBOBJ($LL_INT_TYPE)
31 + AC_MSG_RESULT(found $LL_INT_TYPE (cached))
32 +elif test -r /dev/bpf0 ; then
33 AC_LIBOBJ([libnet_link_bpf])
34 AC_MSG_RESULT(found bpf)
35 elif test -r /usr/include/net/pfilt.h ; then