Running ldd on Linux only originates from the Travis CI setup, where the
OS was either Linux or macOS. However, ldd is available in BSD systems
too, and macOS seems to have its own tool for the same job.
run_after_echo "$TCPDUMP_BIN -h"
run_after_echo "$TCPDUMP_BIN -D"
system=$(uname -s)
-if [ "$system" = Linux ]; then
+case "$system" in
+Linux|FreeBSD|NetBSD|OpenBSD)
run_after_echo "ldd $TCPDUMP_BIN"
-fi
+ ;;
+Darwin)
+ run_after_echo "otool -L $TCPDUMP_BIN"
+ ;;
+esac
if [ "$TRAVIS" = true ]; then
if [ -n "$LD_LIBRARY_PATH" ]; then
run_after_echo "sudo LD_LIBRARY_PATH=$LD_LIBRARY_PATH $TCPDUMP_BIN -J"