From: Denis Ovsienko Date: Mon, 5 Jul 2021 17:22:23 +0000 (+0100) Subject: CI: List shared libraries on more OSes. X-Git-Url: https://git.tcpdump.org/tcpdump/commitdiff_plain/d56f0615004ad251a430623a34268a2ce72ba8a2?ds=sidebyside CI: List shared libraries on more OSes. 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. --- diff --git a/build.sh b/build.sh index 1e6fbbf9..cb1771fc 100755 --- a/build.sh +++ b/build.sh @@ -64,9 +64,14 @@ run_after_echo "$TCPDUMP_BIN --version" 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"