From ed61c3b7b5ebdde30f4d887972876b210fae2372 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Sun, 8 Mar 2015 17:55:49 +0100 Subject: Fix static linking of programs using pthread The libc-provided lockfile functions must be overriden by the libpthread ones. * sysdeps/pthread/flockfile.c (_IO_flockfile): Make alias weak. * sysdeps/pthread/ftrylockfile.c (_IO_ftrylockfile): Likewise. * sysdeps/pthread/funlockfile.c (_IO_funlockfile): Likewise. --- sysdeps/pthread/flockfile.c | 2 +- sysdeps/pthread/ftrylockfile.c | 2 +- sysdeps/pthread/funlockfile.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'sysdeps/pthread') diff --git a/sysdeps/pthread/flockfile.c b/sysdeps/pthread/flockfile.c index bddd46c..89e690d 100644 --- a/sysdeps/pthread/flockfile.c +++ b/sysdeps/pthread/flockfile.c @@ -29,5 +29,5 @@ __flockfile (stream) __libc_ptf_call (_IO_flockfile, (stream), 0); #endif } -strong_alias (__flockfile, _IO_flockfile) +weak_alias (__flockfile, _IO_flockfile) weak_alias (__flockfile, flockfile) diff --git a/sysdeps/pthread/ftrylockfile.c b/sysdeps/pthread/ftrylockfile.c index 7aafbe9..e8f8060 100644 --- a/sysdeps/pthread/ftrylockfile.c +++ b/sysdeps/pthread/ftrylockfile.c @@ -32,5 +32,5 @@ __ftrylockfile (stream) return 0; #endif } -strong_alias (__ftrylockfile, _IO_ftrylockfile) +weak_alias (__ftrylockfile, _IO_ftrylockfile) weak_alias (__ftrylockfile, ftrylockfile) diff --git a/sysdeps/pthread/funlockfile.c b/sysdeps/pthread/funlockfile.c index 59fa40e..65201ed 100644 --- a/sysdeps/pthread/funlockfile.c +++ b/sysdeps/pthread/funlockfile.c @@ -30,5 +30,5 @@ __funlockfile (stream) __libc_ptf_call (_IO_funlockfile, (stream), 0); #endif } -strong_alias (__funlockfile, _IO_funlockfile) +weak_alias (__funlockfile, _IO_funlockfile) weak_alias (__funlockfile, funlockfile) -- cgit v1.2.3