e2fsprogs/SOURCES/e2fsprogs-1.45.5-ext2fs-fix-ABI-change-in-the-struct_ext2_filsys-stru.patch

51 lines
1.4 KiB
Diff
Raw Normal View History

2020-04-23 22:07:34 +00:00
From 687ba50f6dde0b753870fcd62be5ef30c75bb38f Mon Sep 17 00:00:00 2001
From: Lukas Czerner <lczerner@redhat.com>
Date: Tue, 14 Jan 2020 20:56:41 +0100
Subject: [PATCH] ext2fs: fix ABI change in the struct_ext2_filsys structure
Upstream increased size of the struct_ext2_filsys structure by adding
new encoding member. However this represents ABI breakage within a major
RHEL release. To avoid it use some of the reserved space in the
struct_ext2_filsys structure.
Signed-off-by: Lukas Czerner <lczerner@redhat.com>
---
lib/ext2fs/ext2fs.h | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/lib/ext2fs/ext2fs.h b/lib/ext2fs/ext2fs.h
index c50a67cf..5bb9133a 100644
--- a/lib/ext2fs/ext2fs.h
+++ b/lib/ext2fs/ext2fs.h
@@ -250,10 +250,17 @@ struct struct_ext2_filsys {
int cluster_ratio_bits;
__u16 default_bitmap_type;
__u16 pad;
+
+ /*
+ * RedHat specific change to prevent ABI change by using 8
+ * reserved bytes
+ */
+ const struct ext2fs_nls_table *encoding;
+
/*
* Reserved for future expansion
*/
- __u32 reserved[5];
+ __u32 reserved[5 - (sizeof(long int)/4)];
/*
* Reserved for the use of the calling application.
@@ -304,8 +311,6 @@ struct struct_ext2_filsys {
/* hashmap for SHA of data blocks */
struct ext2fs_hashmap* block_sha_map;
-
- const struct ext2fs_nls_table *encoding;
};
#if EXT2_FLAT_INCLUDES
--
2.21.1