[vlc-devel] [PATCH 2/2] access_output_file: fix compilation on OS/2

KO Myung-Hun komh78 at gmail.com
Fri May 29 05:20:25 CEST 2015


-----
  CC       access_output/file.lo
access_output/file.c: In function 'Open':
access_output/file.c:288:9: error: implicit declaration of function 'setmode' [-Werror=implicit-function-declaration]
         setmode (STDOUT_FILENO, O_BINARY);
         ^
cc1.exe: some warnings being treated as errors
make.exe[4]: *** [access_output/file.lo] Error 1
-----
---
 modules/access_output/file.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/modules/access_output/file.c b/modules/access_output/file.c
index 87213c9..46966aa 100644
--- a/modules/access_output/file.c
+++ b/modules/access_output/file.c
@@ -37,6 +37,9 @@
 #include <errno.h>
 #include <sys/stat.h>
 #include <unistd.h>
+#ifdef __OS2__
+#   include <io.h>      /* setmode() */
+#endif
 
 #include <vlc_common.h>
 #include <vlc_plugin.h>
-- 
1.9.5




More information about the vlc-devel mailing list