diff options
author | Sergei Trofimovich <slyfox@gentoo.org> | 2019-06-23 21:50:54 +0100 |
---|---|---|
committer | Sergei Trofimovich <slyfox@gentoo.org> | 2019-06-25 07:39:27 +0100 |
commit | ee52c156905c419323865e7cdd2deb46040f0c8a (patch) | |
tree | 9d825d4fc30fce405f4bbc579e6e94d5355a0140 /scripts | |
parent | libsandbox/trace.c: tweak ptrace command type for musl (diff) | |
download | sandbox-ee52c156905c419323865e7cdd2deb46040f0c8a.tar.gz sandbox-ee52c156905c419323865e7cdd2deb46040f0c8a.tar.bz2 sandbox-ee52c156905c419323865e7cdd2deb46040f0c8a.zip |
scripts/gen_symbol_header.awk: undefine libc symbol aliases
Avoid libc's symbol rename via #define. musl defines aliases as:
#define mkstemp64 mkstemp
#define mkstemps64 mkstemps
This causes libsandbox's aliases to clash with one another,
like mkstemp and mkstemp64.
The change does not break glibc and restores musl support.
Bug: https://bugs.gentoo.org/549108
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/gen_symbol_header.awk | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/scripts/gen_symbol_header.awk b/scripts/gen_symbol_header.awk index c9af7f9..3f23134 100644 --- a/scripts/gen_symbol_header.awk +++ b/scripts/gen_symbol_header.awk @@ -117,6 +117,10 @@ END { gsub(/@|\./, "_", sym_real_name); } + # Avoid libc's symbol rename via #define. musl defines aliases as: + # #define mkstemp64 mkstemp + # #define mkstemps64 mkstemps + printf("#undef %s\n", sym_index); printf("#define symname_%s \"%s\"\n", sym_real_name, sym_index); # We handle non-versioned libc's by setting symver_* |