mirror of
https://github.com/moparisthebest/pacman
synced 2024-08-13 17:03:46 -04:00
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 <dan@archlinux.org>
This commit is contained in:
parent
2d991a25ae
commit
ba70c52945
@ -477,7 +477,7 @@ static int extract_single_file(struct archive *archive,
|
|||||||
}
|
}
|
||||||
char *backup = NULL;
|
char *backup = NULL;
|
||||||
/* length is tab char, null byte and MD5 (32 char) */
|
/* 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));
|
MALLOC(backup, backup_len, RET_ERR(PM_ERR_MEMORY, -1));
|
||||||
|
|
||||||
sprintf(backup, "%s\t%s", oldbackup, hash_pkg);
|
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 *backup = NULL, *hash = NULL;
|
||||||
char *oldbackup = alpm_list_getdata(b);
|
char *oldbackup = alpm_list_getdata(b);
|
||||||
/* length is tab char, null byte and MD5 (32 char) */
|
/* 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) {
|
if(!oldbackup || strcmp(oldbackup, entryname) != 0) {
|
||||||
continue;
|
continue;
|
||||||
|
Loading…
Reference in New Issue
Block a user