summaryrefslogtreecommitdiff
path: root/lib/libalpm/package.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libalpm/package.c')
-rw-r--r--lib/libalpm/package.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/libalpm/package.c b/lib/libalpm/package.c
index 8150dd7c..1b006cc4 100644
--- a/lib/libalpm/package.c
+++ b/lib/libalpm/package.c
@@ -148,6 +148,13 @@ void _alpm_pkg_free(void *data)
return;
}
+/* Helper function for comparing packages
+ */
+int _alpm_pkg_cmp(const void *p1, const void *p2)
+{
+ return(strcmp(((pmpkg_t *)p1)->name, ((pmpkg_t *)p2)->name));
+}
+
/* Parses the package description file for the current package
*
* Returns: 0 on success, 1 on error