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

KO Myung-Hun komh78 at gmail.com
Mon Dec 30 14:55:56 CET 2013


  CC       interface/interface.lo
  interface/interface.c: In function 'intf_Create':
  interface/interface.c:81:5: error: implicit declaration of function 'isatty'
  [-Werror=implicit-function-declaration]
  cc1: some warnings being treated as errors
  make.exe[3]: *** [interface/interface.lo] Error 1

  CC       misc/messages.lo
  In file included from misc/messages.c:40:0:
  ../include/vlc_charset.h:154:1: warning: 'warn_unused_result' attribute ignored
  [-Wattributes]
  misc/messages.c: In function 'vlc_LogSet':
  misc/messages.c:241:9: error: implicit declaration of function 'isatty'
  [-Werror=implicit-function-declaration]
  misc/messages.c:241:21: error: 'STDERR_FILENO' undeclared (first use in this
  function)
  misc/messages.c:241:21: note: each undeclared identifier is reported only once
  for each function it appears in
  cc1: some warnings being treated as errors
  make.exe[3]: *** [misc/messages.lo] Error 1
---
 src/interface/interface.c |    4 ++++
 src/misc/messages.c       |    4 ++++
 2 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/src/interface/interface.c b/src/interface/interface.c
index 57c88f6..92410d1 100644
--- a/src/interface/interface.c
+++ b/src/interface/interface.c
@@ -48,6 +48,10 @@
 #include "../lib/libvlc_internal.h"
 #endif
 
+#ifdef __OS2__
+#include <io.h>     /* for isatty() */
+#endif
+
 static int AddIntfCallback( vlc_object_t *, char const *,
                             vlc_value_t , vlc_value_t , void * );
 
diff --git a/src/misc/messages.c b/src/misc/messages.c
index 44b2362..86efff3 100644
--- a/src/misc/messages.c
+++ b/src/misc/messages.c
@@ -35,6 +35,10 @@
 #include <stdlib.h>
 #include <stdarg.h>                                       /* va_list for BSD */
 
+#ifdef __OS2__
+# include <unistd.h>                          /* for isatty(), STDERR_FILENO */
+#endif
+
 #include <vlc_common.h>
 #include <vlc_interface.h>
 #include <vlc_charset.h>
-- 
1.7.3.2




More information about the vlc-devel mailing list