[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

r5320 - in glibc-package/trunk/debian: . sysdeps



Author: aurel32
Date: 2012-10-16 12:54:45 +0000 (Tue, 16 Oct 2012)
New Revision: 5320

Modified:
   glibc-package/trunk/debian/changelog
   glibc-package/trunk/debian/sysdeps/linux.mk
Log:
  * sysdeps/linux.mk: fix kernel version parsing with only two numbers.



Modified: glibc-package/trunk/debian/changelog
===================================================================
--- glibc-package/trunk/debian/changelog	2012-10-09 06:17:15 UTC (rev 5319)
+++ glibc-package/trunk/debian/changelog	2012-10-16 12:54:45 UTC (rev 5320)
@@ -7,6 +7,7 @@
   * patches/kfreebsd/local-getaddrinfo-freebsd-kernel.diff: new patch to
     fix getaddrinfo() when service = 0 on a FreeBSD kernel with DNS
     server returning IPv6, but without IPv6 connection.  Closes: #690021.
+  * sysdeps/linux.mk: fix kernel version parsing with only two numbers.
 
   [ Samuel Thibault ]
   * libc0.3.symbols.hurd-i386: Add missing *_exec_file_name symbols.

Modified: glibc-package/trunk/debian/sysdeps/linux.mk
===================================================================
--- glibc-package/trunk/debian/sysdeps/linux.mk	2012-10-09 06:17:15 UTC (rev 5319)
+++ glibc-package/trunk/debian/sysdeps/linux.mk	2012-10-16 12:54:45 UTC (rev 5320)
@@ -45,8 +45,8 @@
 # into an integer so it can be easily compared and then does so.
 CURRENT_KERNEL_VERSION=$(shell uname -r)
 define kernel_check
-(minimum=$$((`echo $(1) | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\1 \* 65536 + \2 \* 256 + \3/'`)); \
-current=$$((`echo $(CURRENT_KERNEL_VERSION) | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\1 \* 65536 + \2 \* 256 + \3/'`)); \
+(minimum=$$((`echo $(1) | sed 's/^\([0-9]*\.[0-9]*\)\([^.0-9]\|$\)/\1.0\2/; s/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\1 \* 10000 + \2 \* 100 + \3/'`)); \
+current=$$((`echo $(CURRENT_KERNEL_VERSION) | sed 's/^\([0-9]*\.[0-9]*\)\([^.0-9]\|$\)/\1.0\2/; s/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\1 \* 10000 + \2 \* 100 + \3/'`)); \
 if [ $$current -lt $$minimum ]; then \
   false; \
 fi)


Reply to: