]> The Tcpdump Group git mirrors - tcpdump/commitdiff
CI: List shared libraries on more OSes.
authorDenis Ovsienko <[email protected]>
Mon, 5 Jul 2021 17:22:23 +0000 (18:22 +0100)
committerDenis Ovsienko <[email protected]>
Mon, 5 Jul 2021 18:47:25 +0000 (19:47 +0100)
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.

build.sh

index 1e6fbbf9ed68ae9b37cfa688d618b6f2b512cd5c..cb1771fcc91b2cf1b8e0f28f4407ec81af12a220 100755 (executable)
--- 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"