Skip to content

Commit 3fe71f8

Browse files
authored
Merge pull request torvalds#651 from macano953/fix-for-libclang-clang-versions-mismatch-warning
scripts: fix clang version detection on certain Linux distributions
2 parents 85ae8ca + 47889d7 commit 3fe71f8

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

scripts/rust-is-available.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,7 @@ if [ "$1" = -v ]; then
129129
if [ "$cc_name" = Clang ]; then
130130
clang_version=$( \
131131
LC_ALL=C "$CC" --version 2>/dev/null \
132-
| head -n 1 \
133-
| grep -oE '[0-9]+\.[0-9]+\.[0-9]+' \
132+
| sed -nE '1s:.*version ([0-9]+\.[0-9]+\.[0-9]+).*:\1:p'
134133
)
135134
if [ "$clang_version" != "$bindgen_libclang_version" ]; then
136135
echo >&2 "***"

0 commit comments

Comments
 (0)