mirror of
https://github.com/nginx/nginx.git
synced 2025-08-05 22:26:15 +08:00
use uname instead of often outdated header file
This commit is contained in:
parent
2f0d79c896
commit
bb46edaf67
@ -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}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user