ddebug: don't use fmemopen on non-Linux OS
authorMarek Olšák <marek.olsak@amd.com>
Sat, 30 Jul 2016 21:54:06 +0000 (23:54 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Wed, 3 Aug 2016 15:46:46 +0000 (17:46 +0200)
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97140

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/gallium/drivers/ddebug/dd_draw.c

index d3c4e7f5e9c766853143cf4d4f59b19916429458..517e525f03a431e2c24494829d9d281f8e5788d4 100644 (file)
@@ -930,6 +930,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;
@@ -966,6 +967,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