[Mesa-dev] [PATCH] egl/wayland: define set_cloexec_or_close only when mkostemp is not present

Thomas Helland thomashelland90 at gmail.com
Fri Aug 21 15:36:29 PDT 2015


2015-08-21 15:44 GMT+02:00 Boyan Ding <boyan.j.ding at gmail.com>:
> Fixes a compiler warning of defined but not used function when
> HAVE_MKOSTEMP is defined.
>
> Signed-off-by: Boyan Ding <boyan.j.ding at gmail.com>
> ---
>  src/egl/drivers/dri2/platform_wayland.c | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/src/egl/drivers/dri2/platform_wayland.c b/src/egl/drivers/dri2/platform_wayland.c
> index dabaf1eb..dbc64ba 100644
> --- a/src/egl/drivers/dri2/platform_wayland.c
> +++ b/src/egl/drivers/dri2/platform_wayland.c
> @@ -1227,6 +1227,8 @@ dri2_wl_swrast_get_stride_for_format(int format, int w)
>   * Taken from weston shared/os-compatibility.c
>   */
>
> +#ifndef HAVE_MKOSTEMP
> +
>  static int
>  set_cloexec_or_close(int fd)
>  {
> @@ -1249,6 +1251,8 @@ err:
>     return -1;
>  }
>
> +#endif
> +
>  /*
>   * Taken from weston shared/os-compatibility.c
>   */
> --
> 2.5.0
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reviewed-by: Thomas Helland <thomashelland90 at gmail.com>

I'll pull this down into my branch of patches to be merged, and get someone
to merge it some time in the not to distant future, if noone else
picks it up first.


More information about the mesa-dev mailing list