]> The Tcpdump Group git mirrors - tcpdump/commit
Better report errors from stub routines in macOS 14 (Sonoma) libpcap.
authorGuy Harris <[email protected]>
Sat, 23 Sep 2023 20:06:27 +0000 (13:06 -0700)
committerGuy Harris <[email protected]>
Sat, 23 Sep 2023 20:06:27 +0000 (13:06 -0700)
commit2a3bc5716d3afda22c7cab56651c8a03061301b7
tree9c76bd46693d8fe037cbf09aae1ca602a4431646
parent59d7ea4b86d03270963d576985982522fb51db01
Better report errors from stub routines in macOS 14 (Sonoma) libpcap.

Some routines that are built only if libpcap 1.10.x is built with remote
capture support, but that are unconditionally declared in pcap/pcap.h,
now have stub implementations in macOS 14 that always fail and set the
error string to "not supported".  (This was probably done because those
routines are now declared as "weakly linked symbols":

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

om macOS 14.)

This means CMakeLists.txt finds them when you build on Sonoma, so we end
up calling them.

For all code that calls the routines in question, if the any of the
routines in question fail, check for an error string of "not supported",
and report that error as it with "Remote capture not supported", so as
to make the cause of failure clearer.

Fix the misindentation of a closing bracket while we're at it.
tcpdump.c