[vlc-devel] [PATCH v4 05/18] newlib/nacl: Provide flockfile implementation

Julian Scheel julian at jusst.de
Wed Mar 22 09:58:53 CET 2017


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>
---
 compat/flockfile.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/compat/flockfile.c b/compat/flockfile.c
index afe8a3e111..1db85a23a1 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
-- 
2.12.0



More information about the vlc-devel mailing list