From b02e3be83eeb8f3a9c70c597d1bedb595b81a79c Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Mon, 30 Jan 2017 13:20:11 +0100 Subject: Fix the build with gperf 3.1 gperf 3.1 generates lookup functions that take a size_t length parameter instead of unsigned int. Test for this at configure time. Fixes: https://github.com/hughsie/appstream-glib/issues/148 --- libappstream-glib/as-tag.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'libappstream-glib/as-tag.c') diff --git a/libappstream-glib/as-tag.c b/libappstream-glib/as-tag.c index 8bb9519..faf7eb0 100644 --- a/libappstream-glib/as-tag.c +++ b/libappstream-glib/as-tag.c @@ -35,8 +35,7 @@ #include "as-tag.h" -/* we need to define this now as gperf just writes a big header file */ -const struct tag_data *_as_tag_from_gperf (const char *tag, guint etag); +const struct tag_data *_as_tag_from_gperf (const char *tag, GPERF_LEN_TYPE etag); #include "as-tag-private.h" /** @@ -78,7 +77,7 @@ as_tag_from_string_full (const gchar *tag, AsTagFlags flags) return AS_TAG_UNKNOWN; /* use a perfect hash */ - ky = _as_tag_from_gperf (tag, (guint) strlen (tag)); + ky = _as_tag_from_gperf (tag, (GPERF_LEN_TYPE) strlen (tag)); if (ky != NULL) etag = ky->etag; -- cgit v1.2.1