summaryrefslogtreecommitdiff
path: root/missing
diff options
context:
space:
mode:
authorDenis Ovsienko <denis@ovsienko.info>2018-07-28 13:36:17 +0100
committerDenis Ovsienko <denis@ovsienko.info>2018-07-28 13:36:17 +0100
commit40e217a816cee20d4aa92f5d06d7ad5d4acc4050 (patch)
treeb0d443d5b0887051640ea539d4d9c18d4c867e3c /missing
parent93350deda8f0099b4cd1541f2c72ae5c38fc25a5 (diff)
downloadtcpdump-40e217a816cee20d4aa92f5d06d7ad5d4acc4050.tar.gz
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.
Diffstat (limited to 'missing')
-rw-r--r--missing/pcap_dump_ftell.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/missing/pcap_dump_ftell.c b/missing/pcap_dump_ftell.c
index b91fc125..ddc51667 100644
--- a/missing/pcap_dump_ftell.c
+++ b/missing/pcap_dump_ftell.c
@@ -38,5 +38,9 @@
long
pcap_dump_ftell(pcap_dumper_t *p)
{
- return (ftell(pcap_dump_file(p)));
+ /* FIXME: Using pcap_dump_file(p) would be a better style. That would
+ * require to test if pcap_dump_file() is available, and to substitute it,
+ * if it is not.
+ */
+ return (ftell((FILE *)p));
}