From: Joel Rosdahl Date: Mon, 27 Apr 2015 18:48:56 +0000 (+0200) Subject: Fix build error when compiling ccache with recent clang versions X-Git-Tag: v3.2.2~5 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=74f43813b1642b174b4fdc90f5b2b446617350b0;p=thirdparty%2Fccache.git Fix build error when compiling ccache with recent clang versions --- diff --git a/NEWS.txt b/NEWS.txt index 3fe37d206..8bf0f2e37 100644 --- a/NEWS.txt +++ b/NEWS.txt @@ -35,6 +35,8 @@ Bug fixes - Bail out on too hard compiler option `-fplugin=libcc1plugin` (interaction with GDB). +- Fixed build error when compiling ccache with recent clang versions. + ccache 3.2.1 ------------ diff --git a/confitems_lookup.c b/confitems_lookup.c index 2642dd66f..39e95afaf 100644 --- a/confitems_lookup.c +++ b/confitems_lookup.c @@ -75,6 +75,7 @@ confitems_hash (register const char *str, register unsigned int len) return len + asso_values[(unsigned char)str[1]] + asso_values[(unsigned char)str[0]]; } +static #ifdef __GNUC__ __inline #if defined __GNUC_STDC_INLINE__ || defined __GNUC_GNU_INLINE__ diff --git a/dev.mk.in b/dev.mk.in index 914e7e5f9..adc3557f0 100644 --- a/dev.mk.in +++ b/dev.mk.in @@ -92,7 +92,7 @@ endif version.o: version.c %_lookup.c: %.gperf - $(GPERF) $< >$@ + $(GPERF) $< | awk '/#ifdef __GNUC__/ { ++i; if (i == 2) { print "static"; }} {print}' >$@ echo "static const size_t `echo $* | tr a-z A-Z`_TOTAL_KEYWORDS = `sed -nr 's/.*TOTAL_KEYWORDS = ([0-9]+).*/\1/p' $@`;" >>$@ .PHONY: dist diff --git a/envtoconfitems_lookup.c b/envtoconfitems_lookup.c index 2bfd2f820..cb8b53e52 100644 --- a/envtoconfitems_lookup.c +++ b/envtoconfitems_lookup.c @@ -89,6 +89,7 @@ envtoconfitems_hash (register const char *str, register unsigned int len) return hval; } +static #ifdef __GNUC__ __inline #if defined __GNUC_STDC_INLINE__ || defined __GNUC_GNU_INLINE__