Commit 1e66d50a authored by Chris Down's avatar Chris Down Committed by Masahiro Yamada

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: default avatarChris Down <chris@chrisdown.name>
Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
parent 121c5d08
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment