Skip to content

Commit b3939e2

Browse files
dpgeorgecpforbes
authored andcommitted
lib/utils/printf: Exclude __GI_vsnprintf alias for gcc 9 and above.
See issue adafruit#4457.
1 parent 36e2faf commit b3939e2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/utils/printf.c

+3-1
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,11 @@ STATIC void strn_print_strn(void *data, const char *str, size_t len) {
103103
strn_print_env->remain -= len;
104104
}
105105

106-
#if defined(__GNUC__) && !defined(__clang__)
106+
#if defined(__GNUC__) && !defined(__clang__) && __GNUC__ < 9
107107
// uClibc requires this alias to be defined, or there may be link errors
108108
// when linkings against it statically.
109+
// GCC 9 gives a warning about missing attributes so it's excluded until
110+
// uClibc+GCC9 support is needed.
109111
int __GI_vsnprintf(char *str, size_t size, const char *fmt, va_list ap) __attribute__((weak, alias ("vsnprintf")));
110112
#endif
111113

0 commit comments

Comments
 (0)