Mesa (11.2): radeonsi: use util_strchrnul() to fix android build error

Emil Velikov evelikov at kemper.freedesktop.org
Mon Apr 4 11:52:53 UTC 2016


Module: Mesa
Branch: 11.2
Commit: a948723233e7b44f1403a08a3651ea6759fc6c2a
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=a948723233e7b44f1403a08a3651ea6759fc6c2a

Author: Mauro Rossi <issor.oruam at gmail.com>
Date:   Sun Feb 21 20:57:47 2016 +0100

radeonsi: use util_strchrnul() to fix android build 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

Cc: mesa-stable at lists.freedesktop.org
Signed-off-by: Emil Velikov <emil.velikov at collabora.com>
(cherry picked from commit e09d04cd56eaca4db027c7faa3f92f4fb18b6751)

---

 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 57458ae..4230720 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"
@@ -4426,7 +4427,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) {




More information about the mesa-commit mailing list