From 9e9f4261abe887b1d98dedabd6b52dbc238d82bf Mon Sep 17 00:00:00 2001 From: ticktock35 Date: Mon, 15 Dec 2008 00:01:13 -0500 Subject: opkg: enable -Werror in libopkg and fix resulting build failures git-svn-id: http://opkg.googlecode.com/svn/trunk@52 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358 --- (limited to 'libopkg/pkg_vec.h') diff --git a/libopkg/pkg_vec.h b/libopkg/pkg_vec.h index 2bc1631..8941c9b 100644 --- a/libopkg/pkg_vec.h +++ b/libopkg/pkg_vec.h @@ -47,7 +47,9 @@ pkg_t *pkg_vec_insert_merge(pkg_vec_t *vec, pkg_t *pkg, int set_status, opkg_con /* this one never munges pkg */ void pkg_vec_insert(pkg_vec_t *vec, const pkg_t *pkg); int pkg_vec_contains(pkg_vec_t *vec, pkg_t *apkg); -void pkg_vec_sort(pkg_vec_t *vec, int (*compar)(pkg_t *, pkg_t *)); + +typedef int (*compare_fcn_t)(const void *, const void *); +void pkg_vec_sort(pkg_vec_t *vec, compare_fcn_t compar); int pkg_vec_clear_marks(pkg_vec_t *vec); int pkg_vec_mark_if_matches(pkg_vec_t *vec, const char *pattern); @@ -57,6 +59,6 @@ void abstract_pkg_vec_free(abstract_pkg_vec_t *vec); void abstract_pkg_vec_insert(abstract_pkg_vec_t *vec, abstract_pkg_t *pkg); abstract_pkg_t * abstract_pkg_vec_get(abstract_pkg_vec_t *vec, int i); int abstract_pkg_vec_contains(abstract_pkg_vec_t *vec, abstract_pkg_t *apkg); -void abstract_pkg_vec_sort(pkg_vec_t *vec, int (*compar)(abstract_pkg_t *, abstract_pkg_t *)); +void abstract_pkg_vec_sort(pkg_vec_t *vec, compare_fcn_t compar); #endif -- cgit v0.9.1