From ba70c52945c9e568100ca3a4eeb3ea1208d378ad Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Mon, 14 Apr 2008 18:24:45 -0500 Subject: Fix compilation errors on x86_64 Things must have gotten stricter with GCC 4.3 on the '%zd' printf string and this is the first I've tried to compile there. Fix the problem by using size_t instead of int. Signed-off-by: Dan McGee --- lib/libalpm/add.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/libalpm') diff --git a/lib/libalpm/add.c b/lib/libalpm/add.c index aadb6e2a..ca4cfa9a 100644 --- a/lib/libalpm/add.c +++ b/lib/libalpm/add.c @@ -477,7 +477,7 @@ static int extract_single_file(struct archive *archive, } char *backup = NULL; /* length is tab char, null byte and MD5 (32 char) */ - int backup_len = strlen(oldbackup) + 34; + size_t backup_len = strlen(oldbackup) + 34; MALLOC(backup, backup_len, RET_ERR(PM_ERR_MEMORY, -1)); sprintf(backup, "%s\t%s", oldbackup, hash_pkg); @@ -606,7 +606,7 @@ static int extract_single_file(struct archive *archive, char *backup = NULL, *hash = NULL; char *oldbackup = alpm_list_getdata(b); /* length is tab char, null byte and MD5 (32 char) */ - int backup_len = strlen(oldbackup) + 34; + size_t backup_len = strlen(oldbackup) + 34; if(!oldbackup || strcmp(oldbackup, entryname) != 0) { continue; -- cgit v1.2.3-24-g4f1b