| 1 | # HG changeset patch
|
|---|
| 2 | # User Maxim Dounin <mdounin@mdounin.ru>
|
|---|
| 3 | # Date 1313148201 -14400
|
|---|
| 4 | # Node ID 6234b54267ea13057974373d5f3e461795bcd431
|
|---|
| 5 | # Parent 7ea1bba9a4f6fedf1df77201fa15abc0ef07639d
|
|---|
| 6 | Configure: catch up with new Linux version numbering.
|
|---|
| 7 |
|
|---|
| 8 | Catch up with new Linux version numbering scheme as announced at [1] and
|
|---|
| 9 | supress unrecognized versions to actually use default 0.
|
|---|
| 10 |
|
|---|
| 11 | [1] https://lkml.org/lkml/2011/5/29/204
|
|---|
| 12 |
|
|---|
| 13 | diff --git a/auto/os/linux b/auto/os/linux
|
|---|
| 14 | --- a/auto/os/linux
|
|---|
| 15 | +++ b/auto/os/linux
|
|---|
| 16 | @@ -18,7 +18,9 @@ CC_AUX_FLAGS="$cc_aux_flags -D_GNU_SOURC
|
|---|
| 17 | # Linux kernel version
|
|---|
| 18 |
|
|---|
| 19 | version=$((`uname -r \
|
|---|
| 20 | - | sed 's/^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\1*256*256+\2*256+\3/'`))
|
|---|
| 21 | + | sed -n -e 's/^\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/ \
|
|---|
| 22 | + \1*256*256+\2*256+\3/p' \
|
|---|
| 23 | + -e 's/^\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\1*256*256+\2*256/p'`))
|
|---|
| 24 |
|
|---|
| 25 | version=${version:-0}
|
|---|
| 26 |
|
|---|