summaryrefslogtreecommitdiffstats
path: root/libc/stdio/fclose.c
diff options
context:
space:
mode:
Diffstat (limited to 'libc/stdio/fclose.c')
-rw-r--r--libc/stdio/fclose.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libc/stdio/fclose.c b/libc/stdio/fclose.c
index bdf6e52..e94292b 100644
--- a/libc/stdio/fclose.c
+++ b/libc/stdio/fclose.c
@@ -36,6 +36,9 @@
#include <stdlib.h>
#include "local.h"
+/* BIONIC: remove any file lock associated with a FILE* pointer */
+extern void __fremovelock(FILE *fp);
+
int
fclose(FILE *fp)
{
@@ -57,5 +60,6 @@ fclose(FILE *fp)
FREELB(fp);
fp->_flags = 0; /* Release this FILE for reuse. */
fp->_r = fp->_w = 0; /* Mess up if reaccessed. */
+ __fremovelock(fp);
return (r);
}