summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--auto/os/linux4
1 files changed, 2 insertions, 2 deletions
diff --git a/auto/os/linux b/auto/os/linux
index 62bc6253b..3c2c8419d 100644
--- a/auto/os/linux
+++ b/auto/os/linux
@@ -16,8 +16,8 @@ CC_AUX_FLAGS="$CC_AUX_FLAGS -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64"
# Linux kernel version
-version=`grep "#define LINUX_VERSION_CODE" /usr/include/linux/version.h \
- | sed -e 's/^.* \(.*\)$/\1/'`
+version=$((`uname -r \
+ | sed 's/^\([^.]*\)\.\([^.]*\)\.\([^.-]*\).*/\1*256*256+\2*256+\3/'`))
version=${version:-0}