From a155276b30da0619979d0b7d5ae22cb05b9b7d16 Mon Sep 17 00:00:00 2001 From: Erwin Janssen Date: Sat, 10 Sep 2016 00:02:58 +0200 Subject: [PATCH] Change cast of strcmp in bsearch. Casting `strcmp` to `__compar_fn_t` doesn't work on Windows, the build fails. Instead, cast `strcmp` to the required function type: `(int(*)(const void*, const void*)` --- lib/gvc/gvrender.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/gvc/gvrender.c b/lib/gvc/gvrender.c index a41f9528a..a1e5c4206 100644 --- a/lib/gvc/gvrender.c +++ b/lib/gvc/gvrender.c @@ -198,7 +198,7 @@ static void gvrender_resolve_color(gvrender_features_t * features, || (bsearch (tok, features->knowncolors, features->sz_knowncolors, - sizeof(char *), (__compar_fn_t) strcmp)) == NULL) { + sizeof(char *), (int(*)(const void*, const void*)) strcmp)) == NULL) { /* if tok was not found in known_colors */ rc = colorxlate(name, color, features->color_type); if (rc != COLOR_OK) { -- 2.40.0