X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Fstdio%2Fflockfile.c;h=440a36a9aecb9bfb1a08907d2c91ab9513da19e5;hb=e3cd6c5c265cd481db6e0c5b529855d99f0bda30;hp=1b6ef5806fb78818139a509f116664ac96f0cdb8;hpb=5eb0d33ec0f08b123c5c10877d6258d05fa9453a;p=musl 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); }