diff options
author | Maxim Dounin <mdounin@mdounin.ru> | 2011-08-13 15:15:50 +0000 |
---|---|---|
committer | Maxim Dounin <mdounin@mdounin.ru> | 2011-08-13 15:15:50 +0000 |
commit | 1a664a80a9cf7186fd5a0337dc36d432af7ddd8f (patch) | |
tree | cde7d9ce5a8fd4b66e6578c4813711771e5fba4b | |
parent | f46eafd6532426e9d93dc44045390ba96055fe10 (diff) | |
download | nginx-1a664a80a9cf7186fd5a0337dc36d432af7ddd8f.tar.gz nginx-1a664a80a9cf7186fd5a0337dc36d432af7ddd8f.zip |
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/linux | 4 |
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} |