Blame SOURCES/e2fsprogs-1.45.6-Revert-libext2fs-hide-struct-ext2fs_hashmap-as-an-in.patch

0fba97
From cdbe6f07c929b0c9a80b7fbeb61b3a9f66015085 Mon Sep 17 00:00:00 2001
a9c310
From: Lukas Czerner <lczerner@redhat.com>
a9c310
Date: Tue, 14 Jan 2020 09:49:31 +0100
0fba97
Subject: [PATCH 6/7] Revert "libext2fs: hide struct ext2fs_hashmap as an
a9c310
 internal implementation detail"
a9c310
a9c310
This reverts commit ef54444e6d1da4b464c11e749c9643ed945a770b
a9c310
because it breaks ABI.
a9c310
a9c310
Signed-off-by: Lukas Czerner <lczerner@redhat.com>
a9c310
---
a9c310
 lib/ext2fs/hashmap.c | 16 ----------------
a9c310
 lib/ext2fs/hashmap.h | 30 +++++++++++++++++++++---------
a9c310
 2 files changed, 21 insertions(+), 25 deletions(-)
a9c310
a9c310
diff --git a/lib/ext2fs/hashmap.c b/lib/ext2fs/hashmap.c
a9c310
index ffe61ce9..3d8ee814 100644
a9c310
--- a/lib/ext2fs/hashmap.c
a9c310
+++ b/lib/ext2fs/hashmap.c
a9c310
@@ -1,22 +1,6 @@
a9c310
 #include "hashmap.h"
a9c310
 #include <string.h>
a9c310
 
a9c310
-struct ext2fs_hashmap {
a9c310
-	uint32_t size;
a9c310
-	uint32_t(*hash)(const void *key, size_t len);
a9c310
-	void(*free)(void*);
a9c310
-	struct ext2fs_hashmap_entry *first;
a9c310
-	struct ext2fs_hashmap_entry *last;
a9c310
-#if __GNUC_PREREQ (4, 8)
a9c310
-#pragma GCC diagnostic push
a9c310
-#pragma GCC diagnostic ignored "-Wpedantic"
a9c310
-#endif
a9c310
-	struct ext2fs_hashmap_entry *entries[0];
a9c310
-#if __GNUC_PREREQ (4, 8)
a9c310
-#pragma GCC diagnostic pop
a9c310
-#endif
a9c310
-};
a9c310
-
a9c310
 uint32_t ext2fs_djb2_hash(const void *str, size_t size)
a9c310
 {
a9c310
 	int c;
a9c310
diff --git a/lib/ext2fs/hashmap.h b/lib/ext2fs/hashmap.h
a9c310
index dcfa7455..656d3d90 100644
a9c310
--- a/lib/ext2fs/hashmap.h
a9c310
+++ b/lib/ext2fs/hashmap.h
a9c310
@@ -13,15 +13,27 @@
a9c310
 #endif
a9c310
 #endif
a9c310
 
a9c310
-struct ext2fs_hashmap;
a9c310
-
a9c310
-struct ext2fs_hashmap_entry {
a9c310
-	void *data;
a9c310
-	const void *key;
a9c310
-	size_t key_len;
a9c310
-	struct ext2fs_hashmap_entry *next;
a9c310
-	struct ext2fs_hashmap_entry *list_next;
a9c310
-	struct ext2fs_hashmap_entry *list_prev;
a9c310
+struct ext2fs_hashmap {
a9c310
+	uint32_t size;
a9c310
+	uint32_t(*hash)(const void *key, size_t len);
a9c310
+	void(*free)(void*);
a9c310
+	struct ext2fs_hashmap_entry *first;
a9c310
+	struct ext2fs_hashmap_entry *last;
a9c310
+	struct ext2fs_hashmap_entry {
a9c310
+		void *data;
a9c310
+		const void *key;
a9c310
+		size_t key_len;
a9c310
+		struct ext2fs_hashmap_entry *next;
a9c310
+		struct ext2fs_hashmap_entry *list_next;
a9c310
+		struct ext2fs_hashmap_entry *list_prev;
a9c310
+#if __GNUC_PREREQ (4, 8)
a9c310
+#pragma GCC diagnostic push
a9c310
+#pragma GCC diagnostic ignored "-Wpedantic"
a9c310
+#endif
a9c310
+	} *entries[0];
a9c310
+#if __GNUC_PREREQ (4, 8)
a9c310
+#pragma GCC diagnostic pop
a9c310
+#endif
a9c310
 };
a9c310
 
a9c310
 struct ext2fs_hashmap *ext2fs_hashmap_create(
a9c310
-- 
0fba97
2.21.3
a9c310