summaryrefslogtreecommitdiff
path: root/src/stdio/ftrylockfile.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/stdio/ftrylockfile.c')
-rw-r--r--src/stdio/ftrylockfile.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/stdio/ftrylockfile.c b/src/stdio/ftrylockfile.c
index 725b66e7..1d0a1ff8 100644
--- a/src/stdio/ftrylockfile.c
+++ b/src/stdio/ftrylockfile.c
@@ -3,7 +3,7 @@
int ftrylockfile(FILE *f)
{
- libc.lockfile = __lockfile;
+ if (!libc.lockfile) libc.lockfile = __lockfile;
if (f->owner && f->owner == pthread_self()->tid) {
if (f->lockcount == INT_MAX)
return -1;