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

Marek Olšák maraeo at gmail.com
Sun Jul 31 20:57:38 UTC 2016


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
-- 
2.7.4



More information about the mesa-dev mailing list