Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
uPython-mirror
Commits
1f0aaece
Commit
1f0aaece
authored
Dec 10, 2015
by
Paul Sokolovsky
Browse files
lib/utils/printf: Apply workaround for static linking with uclibc.
uclibc objects call __GI_vsnprintf().
parent
645045a7
Changes
1
Hide whitespace changes
Inline
Side-by-side
lib/utils/printf.c
View file @
1f0aaece
...
...
@@ -102,6 +102,12 @@ STATIC void strn_print_strn(void *data, const char *str, size_t len) {
strn_print_env
->
remain
-=
len
;
}
#ifdef __GNUC__
// 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"
)));
#endif
int
vsnprintf
(
char
*
str
,
size_t
size
,
const
char
*
fmt
,
va_list
ap
)
{
strn_print_env_t
strn_print_env
=
{
str
,
size
};
mp_print_t
print
=
{
&
strn_print_env
,
strn_print_strn
};
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment