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

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