Source: cpqarrayd
Version: 2.3-4
Followup-For: Bug #807511

Hello.

I have been trying to fiture out this failure with cpqarrayd on ppc64el.

Since it is a conflict on the types definition, I worked around it by
patching the linux package downloaded to the source tree.

The result is the debdiff attached. It is a very ugly workaround, but it
works.

The build finishes with no errors on ppc64el and I also tested it on amd64
to make sure it does not affected it.
It is a ppc64el specific one, ie, does not work for ppc or ppc64 BE.

Thanks!
diff -Nru cpqarrayd-2.3/debian/changelog cpqarrayd-2.3/debian/changelog
--- cpqarrayd-2.3/debian/changelog	2015-08-08 06:55:01.000000000 +0000
+++ cpqarrayd-2.3/debian/changelog	2016-02-10 11:05:07.000000000 +0000
@@ -1,3 +1,10 @@
+cpqarrayd (2.3-4.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Patch to fix ftbfs on ppc64el 
+
+ -- Fernando Seiti Furusato <[email protected]>  Wed, 10 Feb 2016 11:04:55 +0000
+
 cpqarrayd (2.3-4) unstable; urgency=medium
 
   * Make build agnostic of kernel major version number (Closes: #791618). 
diff -Nru cpqarrayd-2.3/debian/patches/linux-types-ppc64el.patch cpqarrayd-2.3/debian/patches/linux-types-ppc64el.patch
--- cpqarrayd-2.3/debian/patches/linux-types-ppc64el.patch	1970-01-01 00:00:00.000000000 +0000
+++ cpqarrayd-2.3/debian/patches/linux-types-ppc64el.patch	2016-02-10 11:04:16.000000000 +0000
@@ -0,0 +1,63 @@
+diff -purN a/debian/linux/linux-source-4.3/include/linux/types.h b/debian/linux/linux-source-4.3/include/linux/types.h
+--- a/debian/linux/linux-source-4.3/include/linux/types.h	2016-02-09 17:42:39.476237208 +0000
++++ b/debian/linux/linux-source-4.3/include/linux/types.h	2016-02-09 17:44:30.950788014 +0000
+@@ -9,20 +9,22 @@
+ #define DECLARE_BITMAP(name,bits) \
+ 	unsigned long name[BITS_TO_LONGS(bits)]
+ 
++#if defined(__PPC64__) && defined(__LITTLE_ENDIAN__)
++#define u32 __u32
++#define u64 __u64
++#endif
++
+ typedef __u32 __kernel_dev_t;
+ 
+-typedef __kernel_fd_set		fd_set;
+-typedef __kernel_dev_t		dev_t;
++
+ typedef __kernel_ino_t		ino_t;
+ typedef __kernel_mode_t		mode_t;
+ typedef unsigned short		umode_t;
+-typedef __u32			nlink_t;
+ typedef __kernel_off_t		off_t;
+ typedef __kernel_pid_t		pid_t;
+ typedef __kernel_daddr_t	daddr_t;
+ typedef __kernel_key_t		key_t;
+ typedef __kernel_suseconds_t	suseconds_t;
+-typedef __kernel_timer_t	timer_t;
+ typedef __kernel_clockid_t	clockid_t;
+ typedef __kernel_mqd_t		mqd_t;
+ 
+@@ -41,9 +43,16 @@ typedef __kernel_old_uid_t	old_uid_t;
+ typedef __kernel_old_gid_t	old_gid_t;
+ #endif /* CONFIG_UID16 */
+ 
++#if !defined(__PPC64__) && !defined(__LITTLE_ENDIAN__)
++typedef __kernel_fd_set		fd_set;
++typedef __kernel_dev_t		dev_t;
++typedef __u32			nlink_t;
++typedef __kernel_timer_t	timer_t;
++
+ #if defined(__GNUC__)
+ typedef __kernel_loff_t		loff_t;
+ #endif
++#endif /* ppc64el */
+ 
+ /*
+  * The following typedefs are also protected by individual ifdefs for
+@@ -126,6 +135,7 @@ typedef		__s64		int64_t;
+  *
+  * blkcnt_t is the type of the inode's block count.
+  */
++#if !defined(__PPC64__) && !defined(__LITTLE_ENDIAN__)
+ #ifdef CONFIG_LBDAF
+ typedef u64 sector_t;
+ typedef u64 blkcnt_t;
+@@ -133,6 +143,7 @@ typedef u64 blkcnt_t;
+ typedef unsigned long sector_t;
+ typedef unsigned long blkcnt_t;
+ #endif
++#endif
+ 
+ /*
+  * The type of an index into the pagecache.
diff -Nru cpqarrayd-2.3/debian/rules cpqarrayd-2.3/debian/rules
--- cpqarrayd-2.3/debian/rules	2015-08-08 06:43:54.000000000 +0000
+++ cpqarrayd-2.3/debian/rules	2016-02-10 11:03:55.000000000 +0000
@@ -34,6 +34,7 @@
 	mkdir debian/linux
 	cd debian/linux && tar xvf /usr/src/$(KSRC).tar.xz
 	touch unpack-stamp
+	patch -p1 < $(CURDIR)/debian/patches/linux-types-ppc64el.patch
 
 config.status: configure unpack
 	dh_testdir

Reply via email to