void-packages/srcpkgs/android-tools/patches/fix-build-ppc.patch

47 lines
1.7 KiB
Diff

The e2fsprogs headers redefine some __ prefixed types like __u64 and so on with definitions that do not
necessarily match the linux headers (e.g. unsigned long long vs unsigned long). But they do not do that
when linux/types.h is included first.
diff --git a/vendor/e2fsprogs/contrib/android/block_list.c b/vendor/e2fsprogs/contrib/android/block_list.c
index 63cc1a2..e356da9 100644
--- a/vendor/e2fsprogs/contrib/android/block_list.c
+++ b/vendor/e2fsprogs/contrib/android/block_list.c
@@ -1,3 +1,4 @@
+#include <linux/types.h>
#include "block_list.h"
#include "block_range.h"
#include <stdio.h>
diff --git a/vendor/e2fsprogs/contrib/android/e2fsdroid.c b/vendor/e2fsprogs/contrib/android/e2fsdroid.c
index f5d24b8..6a731fb 100644
--- a/vendor/e2fsprogs/contrib/android/e2fsdroid.c
+++ b/vendor/e2fsprogs/contrib/android/e2fsdroid.c
@@ -5,6 +5,7 @@
#include <string.h>
#include <unistd.h>
#include <limits.h>
+#include <linux/types.h>
#include <ext2fs/ext2fs.h>
#include "perms.h"
diff --git a/vendor/e2fsprogs/contrib/android/fsmap.c b/vendor/e2fsprogs/contrib/android/fsmap.c
index 9ee8472..68a9345 100644
--- a/vendor/e2fsprogs/contrib/android/fsmap.c
+++ b/vendor/e2fsprogs/contrib/android/fsmap.c
@@ -1,3 +1,4 @@
+#include <linux/types.h>
#include "fsmap.h"
#include <sys/types.h>
#include <sys/stat.h>
diff --git a/vendor/e2fsprogs/contrib/android/perms.c b/vendor/e2fsprogs/contrib/android/perms.c
index 9c5ec05..4f02104 100644
--- a/vendor/e2fsprogs/contrib/android/perms.c
+++ b/vendor/e2fsprogs/contrib/android/perms.c
@@ -1,6 +1,7 @@
#ifndef _GNU_SOURCE
# define _GNU_SOURCE //asprintf
#endif
+#include <linux/types.h>
#include "perms.h"
#include "support/nls-enable.h"
#include <time.h>