Skip to content

Commit

Permalink
Add weak symbols for __strtol_internal (etc)
Browse files Browse the repository at this point in the history
Seems certain binaries (such as those compiled on centos) contains inlined
references to __strtol_internal (which in turn seems like a bug to me).

Copied the weak defs from the musl version of the file. Other option
is to modify the musl version to deal with OSv file struct and use that instead.

Refs #339

Signed-off-by: Calle Wilund <calle@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
  • Loading branch information
elcallio authored and Pekka Enberg committed Oct 1, 2014
1 parent c9129ee commit c3646e5
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions libc/stdlib/strtol.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,10 @@ uintmax_t strtoumax(const char *restrict s, char **restrict p, int base)
{
return strtoull(s, p, base);
}

weak_alias(strtol, __strtol_internal);
weak_alias(strtoul, __strtoul_internal);
weak_alias(strtoll, __strtoll_internal);
weak_alias(strtoull, __strtoull_internal);
weak_alias(strtoimax, __strtoimax_internal);
weak_alias(strtoumax, __strtoumax_internal);

0 comments on commit c3646e5

Please sign in to comment.