summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2011-08-29 12:47:32 +0000
committerIgor Sysoev <igor@sysoev.ru>2011-08-29 12:47:32 +0000
commitef24db717ca6bc87d2214f3d7c103cac8ced9066 (patch)
tree932407f4a1f4a4e705e130be3d3cf6a32019feca
parent65a179b308bf5a472de4c7a2a20dba08a69651e7 (diff)
downloadnginx-ef24db717ca6bc87d2214f3d7c103cac8ced9066.tar.gz
nginx-ef24db717ca6bc87d2214f3d7c103cac8ced9066.tar.bz2
Merge of r4003:
Configure: catch up with new Linux version numbering (ticket #5). Catch up with new Linux version numbering scheme as announced at [1] and suppress unrecognized versions to actually use default 0. [1] https://lkml.org/lkml/2011/5/29/204
-rw-r--r--auto/os/linux4
1 files changed, 3 insertions, 1 deletions
diff --git a/auto/os/linux b/auto/os/linux
index 9db5f26f3..394cd87bc 100644
--- a/auto/os/linux
+++ b/auto/os/linux
@@ -18,7 +18,9 @@ CC_AUX_FLAGS="$cc_aux_flags -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64"
# Linux kernel version
version=$((`uname -r \
- | sed 's/^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\1*256*256+\2*256+\3/'`))
+ | sed -n -e 's/^\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/ \
+ \1*256*256+\2*256+\3/p' \
+ -e 's/^\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\1*256*256+\2*256/p'`))
version=${version:-0}