summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Ovsienko <denis@ovsienko.info>2022-07-30 14:44:01 +0100
committerDenis Ovsienko <denis@ovsienko.info>2022-07-30 14:44:01 +0100
commite08e6a8e38b7fb05eb4fda4187c86c34aab09885 (patch)
tree3e9ec5b7714bf0ea3c8b4014f22ba84db8aa97d0
parent6fa52fef9bc38fdbcca7407cb039bdc7bc52a957 (diff)
downloadtcpdump-e08e6a8e38b7fb05eb4fda4187c86c34aab09885.tar.gz
Copy build_common.h from libpcap. [skip ci]
-rw-r--r--build_common.sh11
1 files changed, 9 insertions, 2 deletions
diff --git a/build_common.sh b/build_common.sh
index f65e6209..b5fa66b6 100644
--- a/build_common.sh
+++ b/build_common.sh
@@ -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'
;;