mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-08-09 17:03:35 -09:00
package/android-tools: fix build issue on mips64 and powerpc64
The kernel headers on mips64 and powerpc64 were historically "broken", defining u64 as an "unsigned long" instead of "unsigned long long". This has been fixed in the upstream Linux kernel by introducing the __SANE_USERSPACE_TYPES__ definition. Our commita2e178d6b4("android-tools: disable on some architecture with old kernel headers") already disabled building fastboot on powerpc64 and mips64 systems that have too old kernel headers. However, it turns out that even with the new kernel headers, there are build issues because __SANE_USERSPACE_TYPES__ isn't defined everywhere it should be in the android-tools code base. The Debian patche debian/patches/ppc64el-ftbfs.patch adds some definitions, but it's missing one file, and in another the definition comes too late. This commit adds an extra patch that fixes this up, and makes fastboot build properly on mips64 and powerpc64. Fixes: http://autobuild.buildroot.net/results/8528ff876e695f79bdfe64f5330d9d51eeef66cb/ (powerpc64) http://autobuild.buildroot.net/results/36ac6af73b618c28d1636093da333f7ebd9d6cfe/ (mips64) This issue has been occurring as far as Feb 2021, with the first occurence apparently being: http://autobuild.buildroot.net/results/d9521b4bfeafb1140c21745dbfe28d476a9b71ec/ Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> Signed-off-by: Arnout Vandecappelle <arnout@mind.be> (cherry picked from commitee65a2119a) Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
This commit is contained in:
committed by
Peter Korsgaard
parent
0a0dfa9cb2
commit
b8e9a352d2
@@ -0,0 +1,68 @@
|
||||
From 5db9529436f13b8c073a0310da3a1107f84645da Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
|
||||
Date: Wed, 4 Dec 2024 20:51:22 +0100
|
||||
Subject: [PATCH] extras/ext4_utils/make_ext4fs.c: define
|
||||
__SANE_USERSPACE_TYPES__
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
The Debian patch ppc64el-ftbfs.patch is already defining
|
||||
__SANE_USERSPACE_TYPES__ in a few files to solve a conflict between
|
||||
kernel header definitions and local definition of some types, on
|
||||
powerpc64 and mips64.
|
||||
|
||||
However, the Debian patch lacks an update to ext4_utils.c, and has the
|
||||
definition too late in make_ext4fs.c. This commit therefore fixes
|
||||
those two remaining issues, fixing:
|
||||
|
||||
error: conflicting types for ‘u64’; have ‘long unsigned int’
|
||||
|
||||
Upstream: N/A, we're too far from upstream
|
||||
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
|
||||
---
|
||||
extras/ext4_utils/ext4_utils.c | 5 ++++-
|
||||
extras/ext4_utils/make_ext4fs.c | 4 ++++
|
||||
2 files changed, 8 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/extras/ext4_utils/ext4_utils.c b/extras/ext4_utils/ext4_utils.c
|
||||
index e95f5cc..9f6836f 100644
|
||||
--- a/extras/ext4_utils/ext4_utils.c
|
||||
+++ b/extras/ext4_utils/ext4_utils.c
|
||||
@@ -14,6 +14,10 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
+#if defined(__linux__)
|
||||
+#define __SANE_USERSPACE_TYPES__
|
||||
+#endif
|
||||
+
|
||||
#include "ext4_utils.h"
|
||||
#include "uuid.h"
|
||||
#include "allocate.h"
|
||||
@@ -36,7 +40,6 @@
|
||||
#endif
|
||||
|
||||
#if defined(__linux__)
|
||||
-#define __SANE_USERSPACE_TYPES__
|
||||
#include <linux/fs.h>
|
||||
#elif defined(__APPLE__) && defined(__MACH__)
|
||||
#include <sys/disk.h>
|
||||
diff --git a/extras/ext4_utils/make_ext4fs.c b/extras/ext4_utils/make_ext4fs.c
|
||||
index 3124aed..332a213 100644
|
||||
--- a/extras/ext4_utils/make_ext4fs.c
|
||||
+++ b/extras/ext4_utils/make_ext4fs.c
|
||||
@@ -14,6 +14,10 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
+#if defined(__linux__)
|
||||
+#define __SANE_USERSPACE_TYPES__
|
||||
+#endif
|
||||
+
|
||||
#include "make_ext4fs.h"
|
||||
#include "ext4_utils.h"
|
||||
#include "allocate.h"
|
||||
--
|
||||
2.47.0
|
||||
|
||||
Reference in New Issue
Block a user