Fix unaligned memory access
Bug found on sparc64. Thanks to "Jan Engelhardt <jengelh@medozas.de>"
for providing access to such a machine.
diff --git a/libkmod/libkmod-index.c b/libkmod/libkmod-index.c
index f908d27..2f6e799 100644
--- a/libkmod/libkmod-index.c
+++ b/libkmod/libkmod-index.c
@@ -669,7 +669,7 @@
child_count = 0;
}
- children_padding = (offsetof(struct index_mm_node, children) +
+ children_padding = (sizeof(struct index_mm_node) +
(sizeof(uint32_t) * child_count)) % sizeof(void *);
if (offset & INDEX_NODE_VALUES)