From 556d85c62eaa46f4f668fb1ac56a16c3158f24c5 Mon Sep 17 00:00:00 2001 From: rofl0r Date: Fri, 16 Aug 2013 06:22:01 +0200 Subject: libudev/strbuf.c: remove usage of glibc-internal __compar_fn_t Signed-off-by: Anthony G. Basile --- src/libudev/strbuf.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/libudev/strbuf.c b/src/libudev/strbuf.c index 01a076c2ba..189b01a81a 100644 --- a/src/libudev/strbuf.c +++ b/src/libudev/strbuf.c @@ -95,8 +95,8 @@ void strbuf_cleanup(struct strbuf *str) { free(str); } -static int strbuf_children_cmp(const struct strbuf_child_entry *n1, - const struct strbuf_child_entry *n2) { +static int strbuf_children_cmp(const void* v1, const void* v2) { + const struct strbuf_child_entry *n1 = v1, *n2 = v2; return n1->c - n2->c; } @@ -161,8 +161,7 @@ ssize_t strbuf_add_string(struct strbuf *str, const char *s, size_t len) { c = s[len - 1 - depth]; search.c = c; child = bsearch(&search, node->children, node->children_count, - sizeof(struct strbuf_child_entry), - (__compar_fn_t) strbuf_children_cmp); + sizeof(struct strbuf_child_entry), strbuf_children_cmp); if (!child) break; node = child->child; -- cgit v1.2.3-54-g00ecf