[vlc-devel] [PATCH] O_DIRECTORY workaround in vlc_fixups.h
Rafaël Carré
funman at videolan.org
Wed Feb 29 23:40:02 CET 2012
Le 2012-02-29 11:09, Maciej Blizinski a écrit :
> When not defined, set the value to 0.
> Fixes a gnutls.c build issue on Solaris 10, which doesn't have O_DIRECTORY.
>
> Ref: http://mailman.videolan.org/pipermail/vlc-devel/2012-February/086933.html
> ---
> modules/misc/gnutls.c | 15 +++++++++++++++
> 1 files changed, 15 insertions(+), 0 deletions(-)
>
> diff --git a/modules/misc/gnutls.c b/modules/misc/gnutls.c
> index d52d3ec..6299a31 100644
> --- a/modules/misc/gnutls.c
> +++ b/modules/misc/gnutls.c
> @@ -58,6 +58,21 @@
> #include <assert.h>
>
> /*****************************************************************************
> + * Portability issues
> + *****************************************************************************/
> +
> +/* O_DIRECTORY is a constant introduced in POSIX.1-2008, not present on some
> + * platforms.
> + *
> + * Ref:
> + * http://lists.opencsw.org/pipermail/devel/2012-February/022302.html
> + * http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/fcntl.h.html
> + */
> +#ifndef O_DIRECTORY
> +#define O_DIRECTORY 0
> +#endif
> +
> +/*****************************************************************************
> * Module descriptor
> *****************************************************************************/
> static int OpenClient (vlc_tls_t *, int, const char *);
lgtm but will obviously need to be duplicated if other code use it.
btw man 2 open says it
"should not be used outside of the implementation of opendir(3)"
More information about the vlc-devel
mailing list