aboutsummaryrefslogtreecommitdiffstats
path: root/main/apk-tools/0001-db-fix-hash-lookups-on-64-bit-machines.patch
blob: 327055723de2b5df8c2f233bc0a6b7d8fc9fe270 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
From 37e8f803a531caac144b075a127f48b7c38fc747 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Timo=20Ter=C3=A4s?= <timo.teras@iki.fi>
Date: Tue, 23 Nov 2010 11:32:42 +0200
Subject: [PATCH 1/2] db: fix hash lookups on 64-bit machines

The hash is 'unsigned long' everywhere which is 64-bits (on 64-bit
boxes). Fix the one instance of it being 'unsigned int' since that
would be 32-bit and cause lookup failures on 64-bit boxes.
---
 src/apk_database.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/apk_database.h b/src/apk_database.h
index 249ddae..7b36978 100644
--- a/src/apk_database.h
+++ b/src/apk_database.h
@@ -44,7 +44,7 @@ struct apk_db_file {
 struct apk_db_dir {
 	apk_hash_node hash_node;
 
-	unsigned int hash;
+	unsigned long hash;
 	struct hlist_head files;
 	struct apk_db_dir *parent;
 
-- 
1.7.3.2