Wireshark-dev: Re: [Wireshark-dev] pcap_breakloop and MacOSX

From: Guy Harris <guy@xxxxxxxxxxxx>
Date: Sat, 14 Apr 2007 15:52:17 -0700
Sebastien Tandel wrote:

    the ./configure on MacOSX finds the function pcap_breakloop but when
arriving at compiling capture_loop.c, gcc tells that it is an implicit
declaration. Is there some header file missing?

As part of a Security Update to Panther, libpcap was updated (probably because tcpdump was updated to fix some security issues, and the corresponding version of libpcap was picked up as well). That updated it from a version that didn't have pcap_breakloop() to a version that did.

Security Updates - and Software Updates - unfortunately don't include updated header files, so later versions of Panther had a version of libpcap that provided more functions than were declared in its pcap.h header.

This problem even occurs with systems that ship with later Panther releases.

(10.4's libpcap already had pcap_breakloop(), so its header and library didn't have that problem. That's why this isn't an issue on Tiger.)

AC_WIRESHARK_PCAP_CHECK in acinclude.m4 already works around this for pcap_findalldevs(); we could do the same for pcap_breakloop().