diff options
author | Khem Raj <raj.khem@gmail.com> | 2023-01-14 07:49:21 -0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-01-16 10:42:07 +0000 |
commit | 288cc5b879563f7f996733bc9da3b4316aa5ede0 (patch) | |
tree | b825c54c63549643b09566107e1a22426bc1d131 | |
parent | b622f7f8f0dd5eb5c3262ae3a95e72dc68cc3470 (diff) | |
download | poky-288cc5b879563f7f996733bc9da3b4316aa5ede0.tar.gz |
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 <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/recipes-extended/gperf/gperf/0001-Make-the-code-C-17-compliant.patch | 29 | ||||
-rw-r--r-- | meta/recipes-extended/gperf/gperf_3.1.bb | 3 |
2 files changed, 31 insertions, 1 deletions
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 @@ | |||
1 | From 6194f0027045433598a61965758b4531a3d06d1f Mon Sep 17 00:00:00 2001 | ||
2 | From: Bruno Haible <bruno@clisp.org> | ||
3 | Date: Sun, 30 Aug 2020 12:36:15 +0200 | ||
4 | Subject: [PATCH] Make the code C++17 compliant. | ||
5 | |||
6 | * lib/getline.cc (getstr): Don't use the 'register' keyword. | ||
7 | |||
8 | Upstream-Status: Backport [https://git.savannah.gnu.org/gitweb/?p=gperf.git;a=commit;h=a63b830554920476881837eeacd4a6b507632b19] | ||
9 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
10 | --- | ||
11 | lib/getline.cc | 2 +- | ||
12 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
13 | |||
14 | diff --git a/lib/getline.cc b/lib/getline.cc | ||
15 | index c57c633..0984a7c 100644 | ||
16 | --- a/lib/getline.cc | ||
17 | +++ b/lib/getline.cc | ||
18 | @@ -55,7 +55,7 @@ getstr (char **lineptr, size_t *n, FILE *stream, char terminator, size_t offset) | ||
19 | |||
20 | for (;;) | ||
21 | { | ||
22 | - register int c = getc (stream); | ||
23 | + int c = getc (stream); | ||
24 | |||
25 | /* We always want at least one char left in the buffer, since we | ||
26 | always (unless we get an error while reading the first char) | ||
27 | -- | ||
28 | 2.39.0 | ||
29 | |||
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" | |||
5 | LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \ | 5 | LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \ |
6 | file://src/main.cc;beginline=8;endline=19;md5=dec8f611845d047387ed56b5b85fa99b" | 6 | file://src/main.cc;beginline=8;endline=19;md5=dec8f611845d047387ed56b5b85fa99b" |
7 | 7 | ||
8 | SRC_URI = "${GNU_MIRROR}/${BPN}/${BP}.tar.gz" | 8 | SRC_URI = "${GNU_MIRROR}/${BPN}/${BP}.tar.gz \ |
9 | file://0001-Make-the-code-C-17-compliant.patch" | ||
9 | SRC_URI[md5sum] = "9e251c0a618ad0824b51117d5d9db87e" | 10 | SRC_URI[md5sum] = "9e251c0a618ad0824b51117d5d9db87e" |
10 | SRC_URI[sha256sum] = "588546b945bba4b70b6a3a616e80b4ab466e3f33024a352fc2198112cdbb3ae2" | 11 | SRC_URI[sha256sum] = "588546b945bba4b70b6a3a616e80b4ab466e3f33024a352fc2198112cdbb3ae2" |
11 | 12 | ||