[Mesa-dev] [PATCH 2/5] android: radeonsi: fix building error in si_shader.c

Mauro Rossi issor.oruam at gmail.com
Sun Feb 21 19:57:47 UTC 2016


Hi Micheal,

no problem, I'm learning so much and you and Emil have both shown amounts
of patience with me.

I've tested the following patch and it works

Mauro


>From a00b1182fd74ec6af37e09e53dd3febec36af27d Mon Sep 17 00:00:00 2001
From: Mauro Rossi <issor.oruam at gmail.com>
Date: Sun, 21 Feb 2016 20:31:21 +0100
Subject: [PATCH] radeonsi: use util_strchrnul() to fix android building
error

Android Bionic does not support strchrnul() string function,
gallium auxiliary util/u_string.h provides util_strchrnul()

This change avoids the following building error:

external/mesa/src/gallium/drivers/radeonsi/si_shader.c:3863: error:
undefined reference to 'strchrnul'
collect2: error: ld returned 1 exit status
---
 src/gallium/drivers/radeonsi/si_shader.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/gallium/drivers/radeonsi/si_shader.c
b/src/gallium/drivers/radeonsi/si_shader.c
index d1482de..192a736 100644
--- a/src/gallium/drivers/radeonsi/si_shader.c
+++ b/src/gallium/drivers/radeonsi/si_shader.c
@@ -39,6 +39,7 @@
 #include "radeon/radeon_llvm_emit.h"
 #include "util/u_memory.h"
 #include "util/u_pstipple.h"
+#include "util/u_string.h"
 #include "tgsi/tgsi_parse.h"
 #include "tgsi/tgsi_util.h"
 #include "tgsi/tgsi_dump.h"
@@ -4019,7 +4020,7 @@ static void si_shader_dump_disassembly(const struct
radeon_shader_binary *binary

             line = binary->disasm_string;
             while (*line) {
-                p = strchrnul(line, '\n');
+                p = util_strchrnul(line, '\n');
                 count = p - line;

                 if (count) {
-- 
2.5.0
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20160221/2aa955ce/attachment-0001.html>


More information about the mesa-dev mailing list