diff options
| author | Khem Raj <raj.khem@gmail.com> | 2020-01-20 09:52:26 -0800 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-01-21 12:52:53 +0000 |
| commit | dfa69259b9d7c1f23c592799230d4d338bc9af57 (patch) | |
| tree | 872412116a9950195bcd2f8d0258bbc757a19ffe /meta/recipes-core/gettext | |
| parent | dd2862668a86db5fccec51f74afc7e4dc85a3eac (diff) | |
| download | poky-dfa69259b9d7c1f23c592799230d4d338bc9af57.tar.gz | |
gettext: Fix overloadable error with clang
Clang detects that getcwd is being re-declared and signatures don't
match, simple solution is to let clang use overloadable attribute
(From OE-Core rev: d32626c3c5b034b72495c2949b3e94ca55f04a9b)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/gettext')
| -rw-r--r-- | meta/recipes-core/gettext/gettext-0.20.1/overloadable.patch | 22 | ||||
| -rw-r--r-- | meta/recipes-core/gettext/gettext_0.20.1.bb | 1 |
2 files changed, 23 insertions, 0 deletions
diff --git a/meta/recipes-core/gettext/gettext-0.20.1/overloadable.patch b/meta/recipes-core/gettext/gettext-0.20.1/overloadable.patch new file mode 100644 index 0000000000..1b41cb464e --- /dev/null +++ b/meta/recipes-core/gettext/gettext-0.20.1/overloadable.patch | |||
| @@ -0,0 +1,22 @@ | |||
| 1 | Use overloadable attribute to aid clang | ||
| 2 | |||
| 3 | Fixes | ||
| 4 | dcigettext.c:147:7: error: redeclaration of 'getcwd' must have the 'overloadable' attribute | ||
| 5 | |||
| 6 | Upstream-Status: Pending | ||
| 7 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 8 | --- a/gettext-runtime/intl/dcigettext.c | ||
| 9 | +++ b/gettext-runtime/intl/dcigettext.c | ||
| 10 | @@ -144,7 +144,11 @@ char *getwd (); | ||
| 11 | # if VMS | ||
| 12 | # define getcwd(buf, max) (getcwd) (buf, max, 0) | ||
| 13 | # else | ||
| 14 | -char *getcwd (); | ||
| 15 | +char | ||
| 16 | +#ifdef __clang__ | ||
| 17 | +__attribute__((overloadable)) | ||
| 18 | +#endif | ||
| 19 | +*getcwd (); | ||
| 20 | # endif | ||
| 21 | # endif | ||
| 22 | # ifndef HAVE_STPCPY | ||
diff --git a/meta/recipes-core/gettext/gettext_0.20.1.bb b/meta/recipes-core/gettext/gettext_0.20.1.bb index 09628bc4a3..3b576f45e9 100644 --- a/meta/recipes-core/gettext/gettext_0.20.1.bb +++ b/meta/recipes-core/gettext/gettext_0.20.1.bb | |||
| @@ -25,6 +25,7 @@ SRC_URI = "${GNU_MIRROR}/gettext/gettext-${PV}.tar.gz \ | |||
| 25 | file://serial-tests-config.patch \ | 25 | file://serial-tests-config.patch \ |
| 26 | file://0001-msgmerge-Fix-behaviour-of-for-msgfmt-on-PO-files-wit.patch \ | 26 | file://0001-msgmerge-Fix-behaviour-of-for-msgfmt-on-PO-files-wit.patch \ |
| 27 | file://0001-tests-autopoint-3-unset-MAKEFLAGS.patch \ | 27 | file://0001-tests-autopoint-3-unset-MAKEFLAGS.patch \ |
| 28 | file://overloadable.patch \ | ||
| 28 | " | 29 | " |
| 29 | 30 | ||
| 30 | SRC_URI[md5sum] = "bb5b0c0caa028105f3ca1905ddc306e2" | 31 | SRC_URI[md5sum] = "bb5b0c0caa028105f3ca1905ddc306e2" |
