summaryrefslogtreecommitdiffstats
path: root/lib/libalpm/cache.c
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2007-03-11 22:10:02 +0100
committerDan McGee <dan@archlinux.org>2007-03-11 22:10:02 +0100
commit7f7da2b5fc01f46d28236384540c7ecfdac16a63 (patch)
treee9b3c02bdc36206e64878ceeef74a9fdf48112ff /lib/libalpm/cache.c
parentf94506396f25cba8a0d485c8d681482db0bd33bb (diff)
downloadpacman-7f7da2b5fc01f46d28236384540c7ecfdac16a63.tar.gz
pacman-7f7da2b5fc01f46d28236384540c7ecfdac16a63.tar.xz
* Fix group comparison issue and associated compilation warnings by using
the alpm strcmp operation which takes void* references. * We had this great visibility patch, but never actually took advantage of it. Added the right compile flag to make it work and added some more SYMEXPORTs where necessary to have a successful compile.
Diffstat (limited to 'lib/libalpm/cache.c')
-rw-r--r--lib/libalpm/cache.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/libalpm/cache.c b/lib/libalpm/cache.c
index cde3d886..ed893470 100644
--- a/lib/libalpm/cache.c
+++ b/lib/libalpm/cache.c
@@ -213,8 +213,8 @@ int _alpm_db_load_grpcache(pmdb_t *db)
grp->packages = alpm_list_add_sorted(grp->packages,
/* gross signature forces us to
* discard const */
- (void *)alpm_pkg_get_name(pkg),
- strcmp);
+ (void*)alpm_pkg_get_name(pkg),
+ _alpm_str_cmp);
db->grpcache = alpm_list_add_sorted(db->grpcache, grp, _alpm_grp_cmp);
} else {
alpm_list_t *j;
@@ -225,7 +225,9 @@ int _alpm_db_load_grpcache(pmdb_t *db)
if(strcmp(grp->name, i->data) == 0) {
const char *pkgname = alpm_pkg_get_name(pkg);
if(!alpm_list_find_str(grp->packages, pkgname)) {
- grp->packages = alpm_list_add_sorted(grp->packages, (void *)pkgname, strcmp);
+ grp->packages = alpm_list_add_sorted(grp->packages,
+ (void*)pkgname,
+ _alpm_str_cmp);
}
}
}