termux-packages/packages/e2fsprogs/clang-compat.patch
2019-05-21 15:00:03 +03:00

211 lines
6.1 KiB
Diff

diff -uNr e2fsprogs-1.45.1/debugfs/set_fields.c e2fsprogs-1.45.1.mod/debugfs/set_fields.c
--- e2fsprogs-1.45.1/debugfs/set_fields.c 2019-05-13 04:23:53.000000000 +0300
+++ e2fsprogs-1.45.1.mod/debugfs/set_fields.c 2019-05-21 14:52:33.637119261 +0300
@@ -296,9 +296,11 @@
{ "checksum", &set_mmp.mmp_checksum, NULL, 4, parse_uint },
{ 0, 0, 0, 0 }
};
+#ifndef __ANDROID__
#if __GNUC_PREREQ (4, 6)
#pragma GCC diagnostic pop
#endif
+#endif
#ifdef UNITTEST
diff -uNr e2fsprogs-1.45.1/e2fsck/problem.c e2fsprogs-1.45.1.mod/e2fsck/problem.c
--- e2fsprogs-1.45.1/e2fsck/problem.c 2019-05-13 04:23:53.000000000 +0300
+++ e2fsprogs-1.45.1.mod/e2fsck/problem.c 2019-05-21 14:52:33.640119278 +0300
@@ -102,10 +102,12 @@
"", /* 21 */
};
+#ifndef __ANDROID__
#if __GNUC_PREREQ (4, 6)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wmissing-field-initializers"
#endif
+#endif
static struct e2fsck_problem problem_table[] = {
@@ -2107,9 +2109,11 @@
{ PR_LATCH_OPTIMIZE_EXT, PR_1E_OPTIMIZE_EXT_HEADER, PR_1E_OPTIMIZE_EXT_END, 0 },
{ -1, 0, 0, 0 },
};
+#ifndef __ANDROID__
#if __GNUC_PREREQ (4, 6)
#pragma GCC diagnostic pop
#endif
+#endif
static struct e2fsck_problem *find_problem(problem_t code)
{
diff -uNr e2fsprogs-1.45.1/lib/ext2fs/ext4_acl.h e2fsprogs-1.45.1.mod/lib/ext2fs/ext4_acl.h
--- e2fsprogs-1.45.1/lib/ext2fs/ext4_acl.h 2019-05-13 04:23:53.000000000 +0300
+++ e2fsprogs-1.45.1.mod/lib/ext2fs/ext4_acl.h 2019-05-21 14:52:33.641119283 +0300
@@ -50,13 +50,17 @@
typedef struct {
__le32 a_version;
+#ifndef __ANDROID__
#if __GNUC_PREREQ (4, 8)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wpedantic"
#endif
+#endif
posix_acl_xattr_entry a_entries[0];
+#ifndef __ANDROID__
#if __GNUC_PREREQ (4, 8)
#pragma GCC diagnostic pop
#endif
+#endif
} posix_acl_xattr_header;
diff -uNr e2fsprogs-1.45.1/lib/ext2fs/fiemap.h e2fsprogs-1.45.1.mod/lib/ext2fs/fiemap.h
--- e2fsprogs-1.45.1/lib/ext2fs/fiemap.h 2019-05-13 04:23:53.000000000 +0300
+++ e2fsprogs-1.45.1.mod/lib/ext2fs/fiemap.h 2019-05-21 14:52:33.641119283 +0300
@@ -31,14 +31,18 @@
__u32 fm_mapped_extents;/* number of extents that were mapped (out) */
__u32 fm_extent_count; /* size of fm_extents array (in) */
__u32 fm_reserved;
+#ifndef __ANDROID__
#if __GNUC_PREREQ (4, 8)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wpedantic"
#endif
+#endif
struct fiemap_extent fm_extents[0]; /* array of mapped extents (out) */
+#ifndef __ANDROID__
#if __GNUC_PREREQ (4, 8)
#pragma GCC diagnostic pop
#endif
+#endif
};
#if defined(__linux__) && !defined(FS_IOC_FIEMAP)
diff -uNr e2fsprogs-1.45.1/lib/ext2fs/hashmap.c e2fsprogs-1.45.1.mod/lib/ext2fs/hashmap.c
--- e2fsprogs-1.45.1/lib/ext2fs/hashmap.c 2019-05-13 04:23:53.000000000 +0300
+++ e2fsprogs-1.45.1.mod/lib/ext2fs/hashmap.c 2019-05-21 14:55:42.819113922 +0300
@@ -7,14 +7,18 @@
void(*free)(void*);
struct ext2fs_hashmap_entry *first;
struct ext2fs_hashmap_entry *last;
+#ifndef __ANDROID__
#if __GNUC_PREREQ (4, 8)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wpedantic"
#endif
+#endif
struct ext2fs_hashmap_entry *entries[0];
+#ifndef __ANDROID__
#if __GNUC_PREREQ (4, 8)
#pragma GCC diagnostic pop
#endif
+#endif
};
uint32_t ext2fs_djb2_hash(const void *str, size_t size)
diff -uNr e2fsprogs-1.45.1/lib/ext2fs/hashmap.h e2fsprogs-1.45.1.mod/lib/ext2fs/hashmap.h
--- e2fsprogs-1.45.1/lib/ext2fs/hashmap.h 2019-05-13 04:23:53.000000000 +0300
+++ e2fsprogs-1.45.1.mod/lib/ext2fs/hashmap.h 2019-05-21 14:53:28.371429925 +0300
@@ -4,6 +4,7 @@
# include <stdlib.h>
# include <stdint.h>
+#ifndef __ANDROID__
#ifndef __GNUC_PREREQ
#if defined(__GNUC__) && defined(__GNUC_MINOR__)
#define __GNUC_PREREQ(maj, min) \
@@ -12,6 +13,7 @@
#define __GNUC_PREREQ(maj, min) 0
#endif
#endif
+#endif
struct ext2fs_hashmap;
diff -uNr e2fsprogs-1.45.1/lib/ext2fs/mmp.c e2fsprogs-1.45.1.mod/lib/ext2fs/mmp.c
--- e2fsprogs-1.45.1/lib/ext2fs/mmp.c 2019-05-13 04:23:53.000000000 +0300
+++ e2fsprogs-1.45.1.mod/lib/ext2fs/mmp.c 2019-05-21 14:52:33.641119283 +0300
@@ -34,12 +34,14 @@
#define O_DIRECT 0
#endif
+#ifndef __ANDROID__
#if __GNUC_PREREQ (4, 6)
#pragma GCC diagnostic push
#ifndef CONFIG_MMP
#pragma GCC diagnostic ignored "-Wunused-parameter"
#endif
#endif
+#endif
errcode_t ext2fs_mmp_read(ext2_filsys fs, blk64_t mmp_blk, void *buf)
{
@@ -467,6 +469,8 @@
return EXT2_ET_OP_NOT_SUPPORTED;
#endif
}
+#ifndef __ANDROID__
#if __GNUC_PREREQ (4, 6)
#pragma GCC diagnostic pop
#endif
+#endif
diff -uNr e2fsprogs-1.45.1/lib/ext2fs/unix_io.c e2fsprogs-1.45.1.mod/lib/ext2fs/unix_io.c
--- e2fsprogs-1.45.1/lib/ext2fs/unix_io.c 2019-05-13 04:23:53.000000000 +0300
+++ e2fsprogs-1.45.1.mod/lib/ext2fs/unix_io.c 2019-05-21 14:52:33.642119289 +0300
@@ -1152,10 +1152,12 @@
}
/* parameters might not be used if OS doesn't support zeroout */
+#ifndef __ANDROID__
#if __GNUC_PREREQ (4, 6)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-parameter"
#endif
+#endif
static errcode_t unix_zeroout(io_channel channel, unsigned long long block,
unsigned long long count)
{
@@ -1204,9 +1206,11 @@
unimplemented:
return EXT2_ET_UNIMPLEMENTED;
}
+#ifndef __ANDROID__
#if __GNUC_PREREQ (4, 6)
#pragma GCC diagnostic pop
#endif
+#endif
static struct struct_io_manager struct_unix_manager = {
.magic = EXT2_ET_MAGIC_IO_MANAGER,
diff -uNr e2fsprogs-1.45.1/misc/filefrag.c e2fsprogs-1.45.1.mod/misc/filefrag.c
--- e2fsprogs-1.45.1/misc/filefrag.c 2019-05-13 04:23:53.000000000 +0300
+++ e2fsprogs-1.45.1.mod/misc/filefrag.c 2019-05-21 14:52:33.642119289 +0300
@@ -537,10 +537,12 @@
char *end;
blocksize = strtoul(optarg, &end, 0);
if (end) {
+#ifndef __ANDROID__
#if __GNUC_PREREQ (7, 0)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wimplicit-fallthrough"
#endif
+#endif
switch (end[0]) {
case 'g':
case 'G':
@@ -557,9 +559,11 @@
default:
break;
}
+#ifndef __ANDROID__
#if __GNUC_PREREQ (7, 0)
#pragma GCC diagnostic pop
#endif
+#endif
}
} else { /* Allow -b without argument for compat. Remove
* this eventually so "-b {blocksize}" works */