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

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