diff options
author | Khem Raj <raj.khem@gmail.com> | 2022-02-09 17:34:44 -0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-02-12 17:05:35 +0000 |
commit | b98a05263614e626dabf9c68b1cf565bf9d29de8 (patch) | |
tree | 9541a6d91a80c26f90944e4d169262564a10917c /meta/recipes-extended/man-db/files | |
parent | c5c9fa771d8e5d7f09dee20b4af248622ba2975d (diff) | |
download | poky-b98a05263614e626dabf9c68b1cf565bf9d29de8.tar.gz |
man-db: Fix build with clang
(From OE-Core rev: f3e14090a3cfe168eb207667b553a861aa7de364)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended/man-db/files')
-rw-r--r-- | meta/recipes-extended/man-db/files/0001-man-Move-local-variable-declaration-to-function-scop.patch | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/meta/recipes-extended/man-db/files/0001-man-Move-local-variable-declaration-to-function-scop.patch b/meta/recipes-extended/man-db/files/0001-man-Move-local-variable-declaration-to-function-scop.patch new file mode 100644 index 0000000000..820b17b5de --- /dev/null +++ b/meta/recipes-extended/man-db/files/0001-man-Move-local-variable-declaration-to-function-scop.patch | |||
@@ -0,0 +1,41 @@ | |||
1 | From 4b5e00ad020ec327cbc934528d02aa8c4fe3910b Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Wed, 9 Feb 2022 17:30:16 -0800 | ||
4 | Subject: [PATCH] man: Move local variable declaration to function scope | ||
5 | |||
6 | There is a clang bug [1] unearthed here, so help clang by re-arranging | ||
7 | code without changing the logic, until its fixed in clang | ||
8 | |||
9 | [1] https://github.com/llvm/llvm-project/issues/53692 | ||
10 | |||
11 | Upstream-Status: Inappropriate [Inappropriate: Clang bug] | ||
12 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
13 | --- | ||
14 | src/man.c | 4 ++-- | ||
15 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
16 | |||
17 | diff --git a/src/man.c b/src/man.c | ||
18 | index c91abf1..3240eea 100644 | ||
19 | --- a/src/man.c | ||
20 | +++ b/src/man.c | ||
21 | @@ -352,7 +352,7 @@ static void init_html_pager (void) | ||
22 | static error_t parse_opt (int key, char *arg, struct argp_state *state) | ||
23 | { | ||
24 | static bool apropos, whatis; /* retain values between calls */ | ||
25 | - | ||
26 | + char *s; | ||
27 | /* Please keep these keys in the same order as in options above. */ | ||
28 | switch (key) { | ||
29 | case 'C': | ||
30 | @@ -383,7 +383,7 @@ static error_t parse_opt (int key, char *arg, struct argp_state *state) | ||
31 | |||
32 | case OPT_WARNINGS: | ||
33 | #ifdef NROFF_WARNINGS | ||
34 | - char *s = xstrdup (arg ? arg : default_roff_warnings); | ||
35 | + s = xstrdup (arg ? arg : default_roff_warnings); | ||
36 | const char *warning; | ||
37 | |||
38 | for (warning = strtok (s, ","); warning; | ||
39 | -- | ||
40 | 2.35.1 | ||
41 | |||