[vlc-devel] [PATCH v2 10/18] keystore: nacl: Include fcntl.h for flock

Dennis Hamester dennis.hamester at startmail.com
Mon Mar 13 11:11:44 CET 2017

From: Julian Scheel <julian at jusst.de>

The native client environment provides flock and it's defines in
glibc-compat thorugh fcntl.h guarded by __BSD_VISIBLE. Include it as

Signed-off-by: Julian Scheel <julian at jusst.de>
 modules/keystore/file.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/modules/keystore/file.c b/modules/keystore/file.c
index ca91a01bf2..5a60ac1b58 100644
--- a/modules/keystore/file.c
+++ b/modules/keystore/file.c
@@ -25,6 +25,10 @@
 #include <stdio.h>
 #include <sys/stat.h>
 #ifdef HAVE_FLOCK
+#ifdef __native_client__
+#define __BSD_VISIBLE 1
+#include <fcntl.h>
 #include <sys/file.h>
 #ifdef HAVE_FCNTL

More information about the vlc-devel mailing list