From 49f0895649d925fa8a66c7c5157aca06e2f13acd Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN\"" Date: Wed, 21 Apr 2010 18:54:58 +0200 Subject: libc/glibc: fix kernel version check Since we log the test strings, it is no longer possible to call the CT_Test* functions from sub-functions that print results to their stdout. diff --git a/scripts/build/libc/glibc.sh b/scripts/build/libc/glibc.sh index a45aef9..b1abe70 100644 --- a/scripts/build/libc/glibc.sh +++ b/scripts/build/libc/glibc.sh @@ -578,7 +578,9 @@ do_libc_min_kernel_config() { # version installed in "usr/include/linux/version.h" in the sys-root. # Parse that instead of having two code-paths. version_code_file="${CT_SYSROOT_DIR}/usr/include/linux/version.h" - CT_TestOrAbort "Linux version is unavailable in installed headers files" -f "${version_code_file}" -a -r "${version_code_file}" + if [ ! -f "${version_code_file}" -o ! -r "${version_code_file}" ]; then + CT_Abort "Linux version is unavailable in installed headers files" + fi version_code=$(grep -E LINUX_VERSION_CODE "${version_code_file}" |cut -d ' ' -f 3) version=$(((version_code>>16)&0xFF)) patchlevel=$(((version_code>>8)&0xFF)) -- cgit v0.10.2-6-g49f6