]> The Tcpdump Group git mirrors - libpcap/commitdiff
Define pcap_open() etc. even without remote capture. 1223/head
authorGuy Harris <[email protected]>
Fri, 22 Sep 2023 21:47:35 +0000 (14:47 -0700)
committerGuy Harris <[email protected]>
Fri, 22 Sep 2023 23:45:30 +0000 (16:45 -0700)
They also support local capture, and we build them even without remote
capture, as their absence may complicate code build on macOS 14 with
Xcode 15, as that platform supports "weakly linked symbols":

https://developer.apple.com/library/archive/documentation/MacOSX/Conceptual/BPFrameworks/Concepts/WeakLinking.html

which are symbols in dynamically-linked shared libraries, declared in
such a fashion that if a program linked against a newer software
development kit (SDK), and using a symbol present in the OS version for
which that SDK is provided, is run on an older OS version that lacks
that symbol, that symbol's value is a NULL pointer.  This allows those
programs to test for the presence of that symbol by checking whether
it's non-null and, if it is, using the symbol, otherwise not using it.

See Wireshark issue 19349:

https://gitlab.com/wireshark/wireshark/-/issues/19349

and this note in that issue:

https://gitlab.com/wireshark/wireshark/-/issues/19349#note_1573375784

for a possible example of such a complication (Apple may have added a
stub pcap_open() to handle this, but that breaks code that expects
pcap_open() to work if present).

Add pcap_open() support in the opentest test program, with the -o flag.


No differences found