summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2019-02-06 01:12:51 +1100
committerCraig Forbes <cpforbes@starlake.org>2019-05-11 00:31:40 -0500
commitb3939e2513d0e9306f1652b17fab153fd8e9af84 (patch)
treecd47e43039b4d351a18b842594446bc6e28af64b
parent36e2faf8d2212a30974cf7069075053ad8af28d0 (diff)
lib/utils/printf: Exclude __GI_vsnprintf alias for gcc 9 and above.
See issue #4457.
-rw-r--r--lib/utils/printf.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/utils/printf.c b/lib/utils/printf.c
index e19da2dc0..3a4cc2549 100644
--- a/lib/utils/printf.c
+++ b/lib/utils/printf.c
@@ -103,9 +103,11 @@ STATIC void strn_print_strn(void *data, const char *str, size_t len) {
strn_print_env->remain -= len;
}
-#if defined(__GNUC__) && !defined(__clang__)
+#if defined(__GNUC__) && !defined(__clang__) && __GNUC__ < 9
// uClibc requires this alias to be defined, or there may be link errors
// when linkings against it statically.
+// GCC 9 gives a warning about missing attributes so it's excluded until
+// uClibc+GCC9 support is needed.
int __GI_vsnprintf(char *str, size_t size, const char *fmt, va_list ap) __attribute__((weak, alias ("vsnprintf")));
#endif