diff --git a/libdnet-stripped/NMAP_MODIFICATIONS b/libdnet-stripped/NMAP_MODIFICATIONS index cf16c74d9..5503ab2db 100644 --- a/libdnet-stripped/NMAP_MODIFICATIONS +++ b/libdnet-stripped/NMAP_MODIFICATIONS @@ -468,3 +468,32 @@ o Made some AIX/HP-UX portability changes sent in by Peter O'Gorman o Added SCTP support. [Daniel Roethlisberger] Merged to libdnet r651 and r652. +o Applied a fix for building on GNU/kFreeBSD from Peter Salinger: +--- configure (revision 15144) ++++ configure (working copy) +@@ -14712,12 +14712,22 @@ + + elif test "$ac_cv_header_net_if_tun_h" = yes ; then + if test "$ac_cv_header_stropts_h" = yes ; then +- case " $LIBOBJS " in ++ case "$host_os" in ++ *kfreebsd*) ++ case " $LIBOBJS " in ++ *" tun-bsd.$ac_objext "* ) ;; ++ *) LIBOBJS="$LIBOBJS tun-bsd.$ac_objext" ++ ;; ++esac ++;; ++ *) ++ case " $LIBOBJS " in + *" tun-solaris.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS tun-solaris.$ac_objext" + ;; + esac +- ++;; ++ esac + else + case " $LIBOBJS " in + *" tun-bsd.$ac_objext "* ) ;; + diff --git a/libdnet-stripped/configure b/libdnet-stripped/configure index 9b784f4e2..4420255dd 100755 --- a/libdnet-stripped/configure +++ b/libdnet-stripped/configure @@ -14712,12 +14712,22 @@ esac elif test "$ac_cv_header_net_if_tun_h" = yes ; then if test "$ac_cv_header_stropts_h" = yes ; then - case " $LIBOBJS " in + case "$host_os" in + *kfreebsd*) + case " $LIBOBJS " in + *" tun-bsd.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS tun-bsd.$ac_objext" + ;; +esac +;; + *) + case " $LIBOBJS " in *" tun-solaris.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS tun-solaris.$ac_objext" ;; esac - +;; + esac else case " $LIBOBJS " in *" tun-bsd.$ac_objext "* ) ;; diff --git a/libdnet-stripped/configure.in b/libdnet-stripped/configure.in index 403623add..f1680258c 100644 --- a/libdnet-stripped/configure.in +++ b/libdnet-stripped/configure.in @@ -279,7 +279,12 @@ if test "$ac_cv_header_linux_if_tun_h" = yes ; then AC_LIBOBJ([tun-linux]) elif test "$ac_cv_header_net_if_tun_h" = yes ; then if test "$ac_cv_header_stropts_h" = yes ; then - AC_LIBOBJ([tun-solaris]) + case "$host_os" in + *kfreebsd*) + AC_LIBOBJ([tun-bsd]);; + *) + AC_LIBOBJ([tun-solaris]);; + esac else AC_LIBOBJ([tun-bsd]) fi