dumpcap is statically linked with libwsutil and, in the main branch,
uses the JSON dumper code in that library. This means that linking with
libwsutil causes the object file for the JSON dumper to be included, and
that code calls isfinite().
As this is linking with a *static* libwsutil, and as, on most if not all
platforms, a static library, unlike a dynamic library, doesn't include
an indication of other libraries on which the library depends, linking
statically with libwsutil does not cause the code that's being linked to
link with those other libraries.
If isfinite() is in the standard system library (as it appears to be in
macOS), that's not a problem.
However, if it's in libm (as it appears to be in FreeBSD), that *is* a
problem, as it means dumpcap needs to be linked with libm. Make it so.
${APPLE_CORE_FOUNDATION_LIBRARY}
${APPLE_SYSTEM_CONFIGURATION_LIBRARY}
${WIN_WS2_32_LIBRARY}
+ ${M_LIBRARIES}
)
if(UNIX)
list(APPEND CAPUTILS_SRC