[Mesa-dev] [PATCH] ddebug: don't use fmemopen on non-Linux OS

Nicolai Hähnle nhaehnle at gmail.com
Tue Aug 2 13:47:50 UTC 2016


Reviewed-by: Nicolai Hähnle <nicolai.haehnle at amd.com>

On 31.07.2016 22:57, Marek Olšák wrote:
> From: Marek Olšák <marek.olsak at amd.com>
>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97140
> ---
>  src/gallium/drivers/ddebug/dd_draw.c | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/src/gallium/drivers/ddebug/dd_draw.c b/src/gallium/drivers/ddebug/dd_draw.c
> index 716208a..833454a 100644
> --- a/src/gallium/drivers/ddebug/dd_draw.c
> +++ b/src/gallium/drivers/ddebug/dd_draw.c
> @@ -934,6 +934,7 @@ PIPE_THREAD_ROUTINE(dd_thread_pipelined_hang_detect, input)
>  static char *
>  dd_get_driver_shader_log(struct dd_context *dctx)
>  {
> +#if defined(PIPE_OS_LINUX)
>     FILE *f;
>     char *buf;
>     int written_bytes;
> @@ -970,6 +971,10 @@ dd_get_driver_shader_log(struct dd_context *dctx)
>     }
>
>     return buf;
> +#else
> +   /* Return an empty string. */
> +   return (char*)calloc(1, 4);
> +#endif
>  }
>
>  static void
>


More information about the mesa-dev mailing list