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 /meta/recipes-extended/gperf/gperf/0001-Make-the-code-C-17-compliant.patch | |
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>
Diffstat (limited to 'meta/recipes-extended/gperf/gperf/0001-Make-the-code-C-17-compliant.patch')
-rw-r--r-- | meta/recipes-extended/gperf/gperf/0001-Make-the-code-C-17-compliant.patch | 29 |
1 files changed, 29 insertions, 0 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 | |||