summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2018-07-26 08:34:05 +0200
committerFlorian Weimer <fweimer@redhat.com>2018-07-26 08:34:05 +0200
commitcfba5dbb10cc3abde632b46c60c10b2843917035 (patch)
tree99dcbadded7f65343a5d7138f5728e2a9d019d5d
parent49dddc3e99a69ecaa022ce703566b9abea2834c5 (diff)
htl: Use weak aliases for public symbols
Strong definitions of flockfile, funlockfile, ftrylockfile can conflict with application symbols when linking statically.
-rw-r--r--ChangeLog5
-rw-r--r--htl/lockfile.c6
2 files changed, 8 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 8b509d4a34..d88a7987f2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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]
diff --git a/htl/lockfile.c b/htl/lockfile.c
index 7828d47dae..1d0ab88b13 100644
--- a/htl/lockfile.c
+++ b/htl/lockfile.c
@@ -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")));