1
0
mirror of https://git.yoctoproject.org/poky synced 2026-05-09 05:29:32 +00:00

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>
This commit is contained in:
Khem Raj
2020-01-20 09:52:26 -08:00
committed by Richard Purdie
parent dd2862668a
commit dfa69259b9
2 changed files with 23 additions and 0 deletions
@@ -0,0 +1,22 @@
Use overloadable attribute to aid clang
Fixes
dcigettext.c:147:7: error: redeclaration of 'getcwd' must have the 'overloadable' attribute
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
--- a/gettext-runtime/intl/dcigettext.c
+++ b/gettext-runtime/intl/dcigettext.c
@@ -144,7 +144,11 @@ char *getwd ();
# if VMS
# define getcwd(buf, max) (getcwd) (buf, max, 0)
# else
-char *getcwd ();
+char
+#ifdef __clang__
+__attribute__((overloadable))
+#endif
+*getcwd ();
# endif
# endif
# ifndef HAVE_STPCPY
@@ -25,6 +25,7 @@ SRC_URI = "${GNU_MIRROR}/gettext/gettext-${PV}.tar.gz \
file://serial-tests-config.patch \
file://0001-msgmerge-Fix-behaviour-of-for-msgfmt-on-PO-files-wit.patch \
file://0001-tests-autopoint-3-unset-MAKEFLAGS.patch \
file://overloadable.patch \
"
SRC_URI[md5sum] = "bb5b0c0caa028105f3ca1905ddc306e2"