git: b5cbe4e98125 - stable/12 - Fix gcc gperf prototypes to avoid redeclaration errors
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 24 Dec 2021 12:13:36 UTC
The branch stable/12 has been updated by dim:
URL: https://cgit.FreeBSD.org/src/commit/?id=b5cbe4e981254184d94b307b7dce0405ffcb0f3f
commit b5cbe4e981254184d94b307b7dce0405ffcb0f3f
Author: Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2021-12-24 12:13:08 +0000
Commit: Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2021-12-24 12:13:08 +0000
Fix gcc gperf prototypes to avoid redeclaration errors
Otherwise, building stable/12's gcc on recent -CURRENT will result in
redeclaration errors:
In file included from /usr/src/contrib/gcc/cp/except.c:892:
/usr/src/contrib/gcc/cp/cfns.gperf:20:1: error: conflicting types for 'hash'
hash (register const char *str, register size_t len)
^
/usr/src/contrib/gcc/cp/cfns.gperf:5:21: note: previous declaration is here
static unsigned int hash (const char *, unsigned int);
^
/usr/src/contrib/gcc/cp/cfns.gperf:78:1: error: conflicting types for 'libc_name_p'
libc_name_p (register const char *str, register size_t len)
^
/usr/src/contrib/gcc/cp/cfns.gperf:9:14: note: previous declaration is here
const char * libc_name_p (const char *, unsigned int);
^
Direct commit to stable/12, since gcc is gone in stable/13 and later.
---
contrib/gcc/cp/cfns.gperf | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/contrib/gcc/cp/cfns.gperf b/contrib/gcc/cp/cfns.gperf
index c713eb0c2bdd..079926562919 100644
--- a/contrib/gcc/cp/cfns.gperf
+++ b/contrib/gcc/cp/cfns.gperf
@@ -2,11 +2,11 @@
#ifdef __GNUC__
__inline
#endif
-static unsigned int hash (const char *, unsigned int);
+static unsigned int hash (register const char *, register size_t);
#ifdef __GNUC__
__inline
#endif
-const char * libc_name_p (const char *, unsigned int);
+const char * libc_name_p (register const char *, register size_t);
%}
%%
# The standard C library functions, for feeding to gperf; the result is used