From f2ed736b29a8e9e772a5fd4b97162b2efdaf9716 Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Sat, 12 Dec 2015 20:19:42 +0200 Subject: [PATCH] lib/utils/printf: Add vsnprintf alias for Clang. Was reported to break MacOSX build. --- lib/utils/printf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/utils/printf.c b/lib/utils/printf.c index 51dc0a86e0..136056a3e2 100644 --- a/lib/utils/printf.c +++ b/lib/utils/printf.c @@ -102,7 +102,7 @@ STATIC void strn_print_strn(void *data, const char *str, size_t len) { strn_print_env->remain -= len; } -#ifdef __GNUC__ +#if defined(__GNUC__) && !defined(__clang__) // uClibc requires this alias to be defined, or there may be link errors // when linkings against it statically. int __GI_vsnprintf(char *str, size_t size, const char *fmt, va_list ap) __attribute__((weak, alias ("vsnprintf")));