# include "config.h"
#endif
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h> /* for unlink() */
+
#include "wimlib/assert.h"
#include "wimlib/endianness.h"
#include "wimlib/error.h"
#include "wimlib/metadata.h"
#include "wimlib/ntfs_3g.h"
#include "wimlib/resource.h"
+#include "wimlib/unaligned.h"
#include "wimlib/util.h"
#include "wimlib/write.h"
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h> /* for unlink() */
-
/* WIM lookup table:
*
* This is a logical mapping from SHA1 message digests to the data streams
struct wim_lookup_table_entry *lte;
struct hlist_node *pos;
- i = *(size_t*)hash % table->capacity;
+ i = load_size_t_unaligned(hash) % table->capacity;
hlist_for_each_entry(lte, pos, &table->array[i], hash_list)
if (hashes_equal(hash, lte->hash))
return lte;