From 40e217a816cee20d4aa92f5d06d7ad5d4acc4050 Mon Sep 17 00:00:00 2001 From: Denis Ovsienko Date: Sat, 28 Jul 2018 13:36:17 +0100 Subject: Stick with one version of pcap_dump_ftell.c. It looks like CMake after commit 3e9e2b6 started to use the newly added missing/pcap_dump_ftell.c to make pcap_dump_ftell() available in tcpdump if libpcap does not have it. However, autotools continued to use the previously existing ./pcap_dump_ftell.c for the same purpose. Remove the previously existing file and amend autotools files to cover pcap_dump_ftell() the same way as the other functions in the missing/ directory files. Amend missing/pcap_dump_ftell.c not to use pcap_dump_file(), as it may be unavailable. This has been tested to work with libpcap 0.6.1. --- configure | 30 +++++++++++++----------------- 1 file changed, 13 insertions(+), 17 deletions(-) (limited to 'configure') diff --git a/configure b/configure index f64c4eea..07febdef 100755 --- a/configure +++ b/configure @@ -5126,6 +5126,19 @@ esac fi +ac_fn_c_check_func "$LINENO" "pcap_dump_ftell" "ac_cv_func_pcap_dump_ftell" +if test "x$ac_cv_func_pcap_dump_ftell" = xyes; then : + $as_echo "#define HAVE_PCAP_DUMP_FTELL 1" >>confdefs.h + +else + case " $LIBOBJS " in + *" pcap_dump_ftell.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS pcap_dump_ftell.$ac_objext" + ;; +esac + +fi + for ac_func in fork vfork strftime do : @@ -6064,23 +6077,6 @@ fi done -ac_fn_c_check_func "$LINENO" "pcap_dump_ftell" "ac_cv_func_pcap_dump_ftell" -if test "x$ac_cv_func_pcap_dump_ftell" = xyes; then : - -$as_echo "#define HAVE_PCAP_DUMP_FTELL 1" >>confdefs.h - -else - - case " $LIBOBJS " in - *" pcap_dump_ftell.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS pcap_dump_ftell.$ac_objext" - ;; -esac - - -fi - - # # Do we have the new open API? Check for pcap_create, and assume that, # if we do, we also have pcap_activate() and the other new routines -- cgit v1.2.1