summaryrefslogtreecommitdiffstatshomepage
path: root/lib/utils/printf.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/utils/printf.c')
-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 1ceeea39ff..0c21fc4c0a 100644
--- a/lib/utils/printf.c
+++ b/lib/utils/printf.c
@@ -99,9 +99,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