From 2b18d6b04b7c5d3d14801119c83d35e33d31d177 Mon Sep 17 00:00:00 2001 From: Juergen Buchmueller Date: Fri, 21 Oct 2016 12:31:52 +0200 Subject: [PATCH] cdecl: fix gcc6 build --- .../cdecl/patches/fix-reserved_keyword.patch | 53 +++++++++++++++++++ srcpkgs/cdecl/template | 2 +- 2 files changed, 54 insertions(+), 1 deletion(-) create mode 100644 srcpkgs/cdecl/patches/fix-reserved_keyword.patch diff --git a/srcpkgs/cdecl/patches/fix-reserved_keyword.patch b/srcpkgs/cdecl/patches/fix-reserved_keyword.patch new file mode 100644 index 00000000000..a8fde941b07 --- /dev/null +++ b/srcpkgs/cdecl/patches/fix-reserved_keyword.patch @@ -0,0 +1,53 @@ +--- cdecl.c 2009-10-20 11:25:25.000000000 +0200 ++++ cdecl.c 2016-10-21 12:29:34.791599362 +0200 +@@ -245,7 +245,7 @@ + /* for unsupported combinations of types. */ + void mbcheck() + { +- register int i, j, restrict; ++ register int i, j, restr; + char *t1, *t2; + + /* Loop through the types */ +@@ -262,26 +262,26 @@ + if (!(modbits & crosstypes[j].bit)) + continue; + /* check the type of restriction */ +- restrict = crosscheck[i][j]; +- if (restrict == ALWAYS) ++ restr = crosscheck[i][j]; ++ if (restr == ALWAYS) + continue; + t1 = crosstypes[i].name; + t2 = crosstypes[j].name; +- if (restrict == NEVER) ++ if (restr == NEVER) + { + notsupported("", t1, t2); + } +- else if (restrict == RITCHIE) ++ else if (restr == RITCHIE) + { + if (RitchieFlag) + notsupported(" (Ritchie Compiler)", t1, t2); + } +- else if (restrict == PREANSI) ++ else if (restr == PREANSI) + { + if (PreANSIFlag || RitchieFlag) + notsupported(" (Pre-ANSI Compiler)", t1, t2); + } +- else if (restrict == ANSI) ++ else if (restr == ANSI) + { + if (!RitchieFlag && !PreANSIFlag) + notsupported(" (ANSI Compiler)", t1, t2); +@@ -290,7 +290,7 @@ + { + (void) fprintf (stderr, + "%s: Internal error in crosscheck[%d,%d]=%d!\n", +- progname, i, j, restrict); ++ progname, i, j, restr); + exit(1); /* NOTREACHED */ + } + } diff --git a/srcpkgs/cdecl/template b/srcpkgs/cdecl/template index 7f63906c4b0..16e4e6407b4 100644 --- a/srcpkgs/cdecl/template +++ b/srcpkgs/cdecl/template @@ -1,7 +1,7 @@ # Template file for 'cdecl' pkgname=cdecl version=2.5 -revision=2 +revision=3 wrksrc="${pkgname}-blocks-${version}" build_style=gnu-makefile make_build_args="-e"