<div dir="ltr"><div>Hi,<br><br>thanks, now they should be ok<br><br><span style="font-family:arial,helvetica,sans-serif">The macro name was changed to __STRCHRNUL_H<br></span><br>Tested by building marshmallow-x86<br></div>M.<br><div><br><br><span style="font-family:monospace,monospace"><br>From c1fd979ee7b3e74c4d097b7b1941ebbe65f8d003 Mon Sep 17 00:00:00 2001<br>From: Mauro Rossi <<a href="mailto:issor.oruam@gmail.com">issor.oruam@gmail.com</a>><br>Date: Sun, 14 Feb 2016 15:34:16 +0100<br>Subject: [PATCH 1/2] android: add support for strchrnul<br><br>Android Bionic has no strchrnul in string functions,<br>radeonsi uses strchrnul, so we need an implementation.<br><br>strchrnul.h is added in top mesa include path.<br>---<br> include/strchrnul.h | 46 ++++++++++++++++++++++++++++++++++++++++++++++<br> 1 file changed, 46 insertions(+)<br> create mode 100644 include/strchrnul.h<br><br>diff --git a/include/strchrnul.h b/include/strchrnul.h<br>new file mode 100644<br>index 0000000..b22028d<br>--- /dev/null<br>+++ b/include/strchrnul.h<br>@@ -0,0 +1,46 @@<br>+/**************************************************************************<br>+ *<br>+ * Copyright (C) 2014 Emil Velikov <<a href="mailto:emil.l.velikov@gmail.com">emil.l.velikov@gmail.com</a>><br>+ *<br>+ * Permission is hereby granted, free of charge, to any person obtaining a<br>+ * copy of this software and associated documentation files (the "Software"),<br>+ * to deal in the Software without restriction, including without limitation<br>+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,<br>+ * and/or sell copies of the Software, and to permit persons to whom the<br>+ * Software is furnished to do so, subject to the following conditions:<br>+ *<br>+ * The above copyright notice and this permission notice shall be included<br>+ * in all copies or substantial portions of the Software.<br>+ *<br>+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR<br>+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,<br>+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL<br>+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER<br>+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING<br>+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER<br>+ * DEALINGS IN THE SOFTWARE.<br>+ *<br>+ **************************************************************************/<br>+<br>+#ifndef __STRCHRNUL_H<br>+#define __STRCHRNUL_H<br>+<br>+#include <string.h><br>+<br>+#if defined(__ANDROID__)<br>+<br>+char *<br>+strchrnul(const char *s, int c)<br>+{<br>+        char * result = strchr(s, c);<br>+<br>+        if (result == NULL) {<br>+                result = s + strlen(s);<br>+        }<br>+<br>+        return result;<br>+}<br>+<br>+#endif /* __ANDROID__ */<br>+<br>+#endif /* __STRCHRNUL_H */<br>-- <br>2.5.0<br></span><br><br><br><br><br><span style="font-family:monospace,monospace">From e6252743efcd487a7b0d9f37712d4d41149ef0dd Mon Sep 17 00:00:00 2001<br>From: Mauro Rossi <<a href="mailto:issor.oruam@gmail.com">issor.oruam@gmail.com</a>><br>Date: Sun, 14 Feb 2016 15:10:16 +0100<br>Subject: [PATCH 2/2] android: radeonsi: fix building error in si_shader.c<br><br>Android Bionic does not support strchrnul() function,<br>causing the following building error:<br><br>external/mesa/src/gallium/drivers/radeonsi/si_shader.c:3863: error: undefined reference to 'strchrnul'<br>collect2: error: ld returned 1 exit status<br>---<br> src/gallium/drivers/radeonsi/si_shader.c | 1 +<br> 1 file changed, 1 insertion(+)<br><br>diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c<br>index 19c427a..ec26d71 100644<br>--- a/src/gallium/drivers/radeonsi/si_shader.c<br>+++ b/src/gallium/drivers/radeonsi/si_shader.c<br>@@ -48,6 +48,7 @@<br> #include "sid.h"<br> <br> #include <errno.h><br>+#include <strchrnul.h><br> <br> static const char *scratch_rsrc_dword0_symbol =<br>     "SCRATCH_RSRC_DWORD0";<br>-- <br>2.5.0</span><br><br></div></div>