]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Copy build_common.h from libpcap. [skip ci]
authorDenis Ovsienko <[email protected]>
Sat, 30 Jul 2022 13:44:01 +0000 (14:44 +0100)
committerDenis Ovsienko <[email protected]>
Sat, 30 Jul 2022 13:44:01 +0000 (14:44 +0100)
build_common.sh

index f65e62093f8d26bb68ac164d1f053f2af17a3869..b5fa66b6e837034041e6655580daa05b2b72de2d 100644 (file)
@@ -43,8 +43,8 @@ mktempdir() {
         mktempdir_diy "$mktempdir_prefix"
         ;;
     *)
-        # At least Linux and OpenBSD implementations require explicit trailing
-        # X'es in the template, so make it the same suffix as above.
+        # At least Haiku, Linux and OpenBSD implementations require explicit
+        # trailing X'es in the template, so make it the same suffix as above.
         mktemp -d -t "${mktempdir_prefix}.XXXXXXXX"
         ;;
     esac
@@ -212,6 +212,13 @@ os_id() {
         # Meaningful version is usually the substring before the first dash.
         echo "$os_id_release" | sed 's/^\([0-9\.]*\).*$/\1/'
         ;;
+    Haiku)
+        # Meaningful version is the substring before the plus sign.
+        # "hrev55181" stands for "R1/beta3".
+        # "hrev54154" stands for "R1/beta2".
+        : "${os_id_version:=`uname -v`}"
+        echo "$os_id_version" | sed 's/^\(hrev.*\)+.*$/\1/'
+        ;;
     *)
         echo 'UNKNOWN'
         ;;