diff options
author | Igor Sysoev <igor@sysoev.ru> | 2008-03-11 16:29:18 +0000 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2008-03-11 16:29:18 +0000 |
commit | bb46edaf672e5b8cbaa4eb69c690761119e32618 (patch) | |
tree | 7d45ee1923d921896bebcf7da331bcd578b0727a /auto | |
parent | 2f0d79c89663b9b43868e926b2643afc105007e3 (diff) |
use uname instead of often outdated header file
Diffstat (limited to 'auto')
-rw-r--r-- | auto/os/linux | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/auto/os/linux b/auto/os/linux index 62bc6253..3c2c8419 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} |