mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-12-29 09:16:33 +00:00
kbuild: Use uname for LINUX_COMPILE_HOST detection
commit 1e66d50ad3
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 <chris@chrisdown.name>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
1b7158b3ea
commit
fef0b00f31
@ -44,7 +44,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
|
||||
|
Loading…
Reference in New Issue
Block a user