From 288cc5b879563f7f996733bc9da3b4316aa5ede0 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sat, 14 Jan 2023 07:49:21 -0800 Subject: gperf: Make the code C++17 compliant Fixes | ../../gperf-3.1/lib/getline.cc:58:7: error: ISO C++17 does not allow 'register' storage class specifier [-Wregister] | register int c = getc (stream); | ^~~~~~~~~ (From OE-Core rev: dd137feabdad2e7a2b3d107c703aad577a2e79c7) Signed-off-by: Khem Raj Signed-off-by: Richard Purdie --- .../gperf/0001-Make-the-code-C-17-compliant.patch | 29 ++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 meta/recipes-extended/gperf/gperf/0001-Make-the-code-C-17-compliant.patch (limited to 'meta/recipes-extended/gperf/gperf/0001-Make-the-code-C-17-compliant.patch') diff --git a/meta/recipes-extended/gperf/gperf/0001-Make-the-code-C-17-compliant.patch b/meta/recipes-extended/gperf/gperf/0001-Make-the-code-C-17-compliant.patch new file mode 100644 index 0000000000..96e70cdb36 --- /dev/null +++ b/meta/recipes-extended/gperf/gperf/0001-Make-the-code-C-17-compliant.patch @@ -0,0 +1,29 @@ +From 6194f0027045433598a61965758b4531a3d06d1f Mon Sep 17 00:00:00 2001 +From: Bruno Haible +Date: Sun, 30 Aug 2020 12:36:15 +0200 +Subject: [PATCH] Make the code C++17 compliant. + +* lib/getline.cc (getstr): Don't use the 'register' keyword. + +Upstream-Status: Backport [https://git.savannah.gnu.org/gitweb/?p=gperf.git;a=commit;h=a63b830554920476881837eeacd4a6b507632b19] +Signed-off-by: Khem Raj +--- + lib/getline.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lib/getline.cc b/lib/getline.cc +index c57c633..0984a7c 100644 +--- a/lib/getline.cc ++++ b/lib/getline.cc +@@ -55,7 +55,7 @@ getstr (char **lineptr, size_t *n, FILE *stream, char terminator, size_t offset) + + for (;;) + { +- register int c = getc (stream); ++ int c = getc (stream); + + /* We always want at least one char left in the buffer, since we + always (unless we get an error while reading the first char) +-- +2.39.0 + -- cgit v1.2.3-54-g00ecf