diff options
Diffstat (limited to 'src/stdio/flockfile.c')
-rw-r--r-- | src/stdio/flockfile.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/stdio/flockfile.c b/src/stdio/flockfile.c index 1b6ef580..440a36a9 100644 --- a/src/stdio/flockfile.c +++ b/src/stdio/flockfile.c @@ -3,7 +3,9 @@ void flockfile(FILE *f) { - pthread_self(); - libc.lockfile = __lockfile; + if (!libc.lockfile) { + pthread_self(); + libc.lockfile = __lockfile; + } __lockfile(f); } |