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);
|       ^~~~~~~~~

Signed-off-by: Khem Raj <raj.k...@gmail.com>
---
 .../0001-Make-the-code-C-17-compliant.patch   | 29 +++++++++++++++++++
 meta/recipes-extended/gperf/gperf_3.1.bb      |  3 +-
 2 files changed, 31 insertions(+), 1 deletion(-)
 create mode 100644 
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 <br...@clisp.org>
+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 <raj.k...@gmail.com>
+---
+ 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
+
diff --git a/meta/recipes-extended/gperf/gperf_3.1.bb 
b/meta/recipes-extended/gperf/gperf_3.1.bb
index 4c32a5dc83..c57ade9fe3 100644
--- a/meta/recipes-extended/gperf/gperf_3.1.bb
+++ b/meta/recipes-extended/gperf/gperf_3.1.bb
@@ -5,7 +5,8 @@ LICENSE  = "GPL-3.0-or-later"
 LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
                     
file://src/main.cc;beginline=8;endline=19;md5=dec8f611845d047387ed56b5b85fa99b"
 
-SRC_URI  = "${GNU_MIRROR}/${BPN}/${BP}.tar.gz"
+SRC_URI  = "${GNU_MIRROR}/${BPN}/${BP}.tar.gz \
+            file://0001-Make-the-code-C-17-compliant.patch"
 SRC_URI[md5sum] = "9e251c0a618ad0824b51117d5d9db87e"
 SRC_URI[sha256sum] = 
"588546b945bba4b70b6a3a616e80b4ab466e3f33024a352fc2198112cdbb3ae2"
 
-- 
2.39.0

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#175854): 
https://lists.openembedded.org/g/openembedded-core/message/175854
Mute This Topic: https://lists.openembedded.org/mt/96268852/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to