Skip to content

Commit 1e66d50

Browse files
cdownmasahir0y
authored andcommitted
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>
1 parent 121c5d0 commit 1e66d50

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

scripts/mkcompile_h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ else
3535
LINUX_COMPILE_BY=$KBUILD_BUILD_USER
3636
fi
3737
if test -z "$KBUILD_BUILD_HOST"; then
38-
LINUX_COMPILE_HOST=`hostname`
38+
LINUX_COMPILE_HOST=`uname -n`
3939
else
4040
LINUX_COMPILE_HOST=$KBUILD_BUILD_HOST
4141
fi

0 commit comments

Comments
 (0)