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

Jean-Baptiste Kempf jb at videolan.org
Sat Nov 8 20:06:46 CET 2014


Why ifdef?

On 08 Nov, KO Myung-Hun wrote :
> Updated a patch to guard with #ifdef.
> 
> KO Myung-Hun wrote:
> > -----
> > access/dvdnav.c: In function 'ProbeDVD':
> > access/dvdnav.c:1469:6: error: implicit declaration of function 'read' [-Werror=implicit-function-declaration]
> >       || read( fd, iso_dsc, sizeof (iso_dsc) ) < (int)sizeof (iso_dsc)
> >       ^
> > access/dvdnav.c:1481:5: error: implicit declaration of function 'close' [-Werror=implicit-function-declaration]
> >      close( fd );
> >      ^
> > -----
> 
> -- 
> KO Myung-Hun
> 
> Using Mozilla SeaMonkey 2.7.2
> Under OS/2 Warp 4 for Korean with FixPak #15
> In VirtualBox v4.1.32 on Intel Core i7-3615QM 2.30GHz with 8GB RAM
> 
> Korean OS/2 User Community : http://www.ecomstation.co.kr
> 

> >From 74c4d4ff85b3682fbefceab451c768ae53a6d92c Mon Sep 17 00:00:00 2001
> From: KO Myung-Hun <komh at chollian.net>
> Date: Wed, 5 Nov 2014 12:31:17 +0900
> Subject: [PATCH] dvdnav: fix compilation on OS/2
> 
> -----
> access/dvdnav.c: In function 'ProbeDVD':
> access/dvdnav.c:1469:6: error: implicit declaration of function 'read' [-Werror=implicit-function-declaration]
>       || read( fd, iso_dsc, sizeof (iso_dsc) ) < (int)sizeof (iso_dsc)
>       ^
> access/dvdnav.c:1481:5: error: implicit declaration of function 'close' [-Werror=implicit-function-declaration]
>      close( fd );
>      ^
> -----
> ---
>  modules/access/dvdnav.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/modules/access/dvdnav.c b/modules/access/dvdnav.c
> index 553ef43..90d93af 100644
> --- a/modules/access/dvdnav.c
> +++ b/modules/access/dvdnav.c
> @@ -42,6 +42,10 @@
>  #include <fcntl.h>
>  #include <errno.h>
>  
> +#ifdef __OS2__
> +#include <io.h>     /* close() */
> +#endif
> +
>  #include <vlc_common.h>
>  #include <vlc_plugin.h>
>  #include <vlc_input.h>
> -- 
> 1.8.5.2
> 

> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel


-- 
With my kindest regards,

-- 
Jean-Baptiste Kempf
http://www.jbkempf.com/ - +33 672 704 734
Sent from my Electronic Device



More information about the vlc-devel mailing list