[vlc-commits] newlib/nacl: Provide flockfile implementation

Julian Scheel git at videolan.org
Thu Mar 23 17:54:23 CET 2017


vlc | branch: master | Julian Scheel <julian at jusst.de> | Wed Mar 22 09:58:53 2017 +0100| [4ad2ec6f24b2932baa096dd86e3b197826c3b205] | committer: Rémi Denis-Courmont

newlib/nacl: Provide flockfile implementation

newlib provides an flockfile implementation via sys/io.h, which is
marked as internal. As we do not have a better alternative make use of
it here, albeit being marked as internal.

Signed-off-by: Julian Scheel <julian at jusst.de>
Signed-off-by: Rémi Denis-Courmont <remi at remlab.net>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4ad2ec6f24b2932baa096dd86e3b197826c3b205
---

 compat/flockfile.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/compat/flockfile.c b/compat/flockfile.c
index afe8a3e..1db85a2 100644
--- a/compat/flockfile.c
+++ b/compat/flockfile.c
@@ -55,6 +55,16 @@ int putc_unlocked (int c, FILE *stream)
     return _putc_nolock (c, stream);
 }
 
+#elif defined __native_client__
+void flockfile (FILE *stream)
+{
+    _flockfile(stream);
+}
+
+void funlockfile (FILE *stream)
+{
+    _funlockfile(stream);
+}
 #else
 # error flockfile not implemented on your platform!
 #endif



More information about the vlc-commits mailing list