diff options
| author | Palmer Dabbelt <palmer@dabbelt.com> | 2018-01-02 18:43:00 -0800 |
|---|---|---|
| committer | Palmer Dabbelt <palmer@dabbelt.com> | 2018-01-02 18:43:00 -0800 |
| commit | 1d1fcd04ebac848accf27941e78e7eb6e3e315d6 (patch) | |
| tree | b12ce8a5baa230f03e776d2b599343aee7a6150c /bsp/libwrap/sys/weak_under_alias.h | |
| parent | cee980238e2dbd7c9af0eb79bd5621a4dc73c234 (diff) | |
Add _FUNC aliases for newlib-2.5.0
I'm not sure what the policy actaully is here, but some newlib functions
now have an extra underscore before them. This defines a bunch of
aliases and some more wrappers to link against the correct newlib
functions for 2.5.0 but maintain compatibility with 2.4.0.
Diffstat (limited to 'bsp/libwrap/sys/weak_under_alias.h')
| -rw-r--r-- | bsp/libwrap/sys/weak_under_alias.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/bsp/libwrap/sys/weak_under_alias.h b/bsp/libwrap/sys/weak_under_alias.h new file mode 100644 index 0000000..7629353 --- /dev/null +++ b/bsp/libwrap/sys/weak_under_alias.h @@ -0,0 +1,7 @@ +#ifndef _BSP_LIBWRAP_WEAK_UNDER_ALIAS_H +#define _BSP_LIBWRAP_WEAK_UNDER_ALIAS_H + +#define weak_under_alias(name) \ + extern __typeof (__wrap_##name) __wrap__##name __attribute__ ((weak, alias ("__wrap_"#name))) + +#endif |
