htl: Use weak aliases for public symbols

Strong definitions of flockfile, funlockfile, ftrylockfile can conflict
with application symbols when linking statically.
This commit is contained in:
Florian Weimer 2018-07-26 08:34:05 +02:00
parent 49dddc3e99
commit cfba5dbb10
2 changed files with 8 additions and 3 deletions

View File

@ -1,3 +1,8 @@
2018-07-26 Florian Weimer <fweimer@redhat.com>
* htl/lockfile.c (flockfile, funlockfile, ftrylockfile): Use weak
aliases for symbols not in the implementation namespace.
2018-07-25 Carlos O'Donell <carlos@redhat.com>
[BZ #23393]

View File

@ -53,8 +53,8 @@ int _IO_ftrylockfile (FILE *)
__attribute__ ((alias ("_cthreads_ftrylockfile")));
void flockfile (FILE *)
__attribute__ ((alias ("_cthreads_flockfile")));
__attribute__ ((weak, alias ("_cthreads_flockfile")));
void funlockfile (FILE *)
__attribute__ ((alias ("_cthreads_funlockfile")));
__attribute__ ((weak, alias ("_cthreads_funlockfile")));
int ftrylockfile (FILE *)
__attribute__ ((alias ("_cthreads_ftrylockfile")));
__attribute__ ((weak, alias ("_cthreads_ftrylockfile")));