summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorChris Down <chris@chrisdown.name>2020-10-20 10:34:59 +0100
committerMasahiro Yamada <masahiroy@kernel.org>2020-10-21 00:46:04 +0900
commit1e66d50ad3a1dbf0169b14d502be59a4b1213149 (patch)
treea33f7ccbbcdb15318cfa80f21348a1cb084320d3 /scripts
parent121c5d08d53cb1f95d9881838523b0305c3f3bef (diff)
downloadlinux-1e66d50ad3a1dbf0169b14d502be59a4b1213149.tar.gz
linux-1e66d50ad3a1dbf0169b14d502be59a4b1213149.tar.bz2
linux-1e66d50ad3a1dbf0169b14d502be59a4b1213149.zip
kbuild: Use uname for LINUX_COMPILE_HOST detection
`hostname` may not be present on some systems as it's not mandated by POSIX/SUSv4. This isn't just a theoretical problem: on Arch Linux, `hostname` is provided by `inetutils`, which isn't part of the base distribution. ./scripts/mkcompile_h: line 38: hostname: command not found Use `uname -n` instead, which is more likely to be available (and mandated by standards). Signed-off-by: Chris Down <chris@chrisdown.name> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/mkcompile_h2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/mkcompile_h b/scripts/mkcompile_h
index baf3ab8d9d49..4ae735039daf 100755
--- a/scripts/mkcompile_h
+++ b/scripts/mkcompile_h
@@ -35,7 +35,7 @@ else
LINUX_COMPILE_BY=$KBUILD_BUILD_USER
fi
if test -z "$KBUILD_BUILD_HOST"; then
- LINUX_COMPILE_HOST=`hostname`
+ LINUX_COMPILE_HOST=`uname -n`
else
LINUX_COMPILE_HOST=$KBUILD_BUILD_HOST
fi