From bb46edaf672e5b8cbaa4eb69c690761119e32618 Mon Sep 17 00:00:00 2001 From: Igor Sysoev Date: Tue, 11 Mar 2008 16:29:18 +0000 Subject: use uname instead of often outdated header file --- auto/os/linux | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'auto') 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} -- cgit