From b8a78600ce14a40beb868c626a5ff7e39f3a8e3e Mon Sep 17 00:00:00 2001 From: Chris Down Date: Tue, 20 Oct 2020 10:34:59 +0100 Subject: [PATCH] kbuild: Use uname for LINUX_COMPILE_HOST detection commit 1e66d50ad3a1dbf0169b14d502be59a4b1213149 upstream. `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 Signed-off-by: Masahiro Yamada Signed-off-by: Greg Kroah-Hartman --- scripts/mkcompile_h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/mkcompile_h b/scripts/mkcompile_h index 06c1e9e3bc38..d3b35c21c1f3 100755 --- a/scripts/mkcompile_h +++ b/scripts/mkcompile_h @@ -45,7 +45,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