Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
micropython
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
card10
micropython
Commits
1f0aaece
Commit
1f0aaece
authored
9 years ago
by
Paul Sokolovsky
Browse files
Options
Downloads
Patches
Plain Diff
lib/utils/printf: Apply workaround for static linking with uclibc.
uclibc objects call __GI_vsnprintf().
parent
645045a7
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/utils/printf.c
+6
-0
6 additions, 0 deletions
lib/utils/printf.c
with
6 additions
and
0 deletions
lib/utils/printf.c
+
6
−
0
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
};
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment