[vlc-devel] [PATCH 3/3] os2: include unistd.h in vlc_common.h

Hugo Beauzée-Luyssen hugo at beauzee.fr
Thu Nov 13 12:18:16 CET 2014


On Thu, Nov 13, 2014, at 09:07 AM, KO Myung-Hun wrote:
> Unlike other OSes, OS/2 does not include unistd.h. Because of this,
> some compilation errors occur only on OS/2, repeatedly. So including
> unistd.h in vlc_common.h is better than repeating fixes in every
> sources.
> ---
>  include/vlc_common.h | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/include/vlc_common.h b/include/vlc_common.h
> index 367c091..8f902f4 100644
> --- a/include/vlc_common.h
> +++ b/include/vlc_common.h
> @@ -425,6 +425,8 @@ typedef enum
>  #   define INCL_PM
>  #   include <os2safe.h>
>  #   include <os2.h>
> +
> +#   include <unistd.h>
>  #endif
>  
>  #include "vlc_mtime.h"
> -- 
> 1.8.5.2
> 
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel

I have a patch that encapsulates all #include <unistd.h> in a #ifdef
HAVE_UNISTD_H
Would that be an acceptable solution? It feels that it clutters the code
a bit, though it feels better than either including it globally at once,
or having an empty unistd.h file somewhere so that the compilation
doesn't fail...

-- 
  Hugo Beauzée-Luyssen
  hugo at beauzee.fr



More information about the vlc-devel mailing list