Accepting request 81181 from home:a_jaeger:branches:openSUSE:Factory

Fix LINUX_VERSION_CODE

OBS-URL: https://build.opensuse.org/request/show/81181
OBS-URL: https://build.opensuse.org/package/show/Base:System/linux-glibc-devel?expand=0&rev=36
This commit is contained in:
Andreas Jaeger 2011-09-07 08:10:41 +00:00 committed by Git OBS Bridge
parent b89e4f1cc2
commit 0327c07ad8
2 changed files with 9 additions and 3 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Wed Sep 7 08:07:24 UTC 2011 - aj@suse.de
- Fix LINUX_VERSION_CODE
-------------------------------------------------------------------
Tue Sep 6 13:47:10 UTC 2011 - aj@suse.de

View File

@ -85,9 +85,10 @@ cat > version.h <<-BOGUS
#error " Please adjust the Makefile accordingly."
#error "======================================================="
#else
#define UTS_RELEASE "%{version}"
#define LINUX_VERSION_CODE `bash -c 'v="%{version}";c=0;read a b <<< "${v//./ }";echo "$(( (($a) << 16) + (($b) << 8) + ($c) ))"'`
#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
BOGUS
# Get LINUX_VERSION_CODE and KERNEL_VERSION directly from kernel
cat usr/include/linux/version.h >> version.h
cat >> version.h <<-BOGUS
#endif
BOGUS
cat version.h