While valgrind shouldn't check the Linux kernel version of the host, it
does and this commit fixes the build if the host is running a 3.0
kernel.

Signed-off-by: Bernhard Walle <bernh...@bwalle.de>
---
 .../0002-configure-fix-build-with-linux-3.0.patch  |   47 ++++++++++++++++++++
 patches/valgrind-3.6.1/series                      |    1 +
 2 files changed, 48 insertions(+), 0 deletions(-)
 create mode 100644 
patches/valgrind-3.6.1/0002-configure-fix-build-with-linux-3.0.patch

diff --git 
a/patches/valgrind-3.6.1/0002-configure-fix-build-with-linux-3.0.patch 
b/patches/valgrind-3.6.1/0002-configure-fix-build-with-linux-3.0.patch
new file mode 100644
index 0000000..3c4d931
--- /dev/null
+++ b/patches/valgrind-3.6.1/0002-configure-fix-build-with-linux-3.0.patch
@@ -0,0 +1,47 @@
+Fix build with Linux 3.0
+
+This commit is from the Valgrind SVN
+(svn://svn.valgrind.org/valgrind/trunk):
+
+------------------------------------------------------------------------
+r11796 | bart | 2011-06-05 10:51:47 +0200 (So, 05. Jun 2011) | 4 Zeilen
+
+Make Valgrind build on Linux kernel 3.0 and beyond. Closes #274926. An official
+statement that the Linux kernel 3.0 API and ABI is compatible with Linux kernel
+2.6 can be found here: http://lkml.org/lkml/2011/5/29/204.
+
+------------------------------------------------------------------------
+
+To avoid running autoreconf, the change has also been made in configure
+directly.
+
+
+Signed-off-by: Bernhard Walle <bernh...@bwalle.de>
+
+---
+ configure    |    2 +-
+ configure.in |    2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+--- a/configure.in
++++ b/configure.in
+@@ -220,7 +220,7 @@ case "${host_os}" in
+         kernel=`uname -r`
+ 
+         case "${kernel}" in
+-             2.6.*) 
++             2.6.*|3.*) 
+                   AC_MSG_RESULT([2.6 family (${kernel})])
+                   AC_DEFINE([KERNEL_2_6], 1, [Define to 1 if you're using 
Linux 2.6.x])
+                   ;;
+--- a/configure
++++ b/configure
+@@ -5348,7 +5348,7 @@ $as_echo_n "checking for the kernel vers
+         kernel=`uname -r`
+ 
+         case "${kernel}" in
+-             2.6.*)
++             2.6.*|3.*) 
+                   { $as_echo "$as_me:${as_lineno-$LINENO}: result: 2.6 family 
(${kernel})" >&5
+ $as_echo "2.6 family (${kernel})" >&6; }
+ 
diff --git a/patches/valgrind-3.6.1/series b/patches/valgrind-3.6.1/series
index 4db899d..8bbcb5f 100644
--- a/patches/valgrind-3.6.1/series
+++ b/patches/valgrind-3.6.1/series
@@ -1,3 +1,4 @@
 # generated by git-ptx-patches
 0001-configure-allow-all-arm-don-t-restrict-to-armv7.patch
 # bfabec993b2d4636784bbd5fd034c019  - git-ptx-patches magic
+0002-configure-fix-build-with-linux-3.0.patch
-- 
1.7.6


-- 
ptxdist mailing list
ptxdist@pengutronix.de

Reply via email to