<div dir="ltr"><span class=""><span style="font-family:monospace,monospace">From 8030a6cd9d7bb3320fca94038f1969db56223598 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: Sat, 6 Feb 2016 23:52:36 +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 | 40 ++++++++++++++++++++++++++++++++++++++++<br> 1 file changed, 40 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..83477e2<br>--- /dev/null<br>+++ b/include/strchrnul.h<br>@@ -0,0 +1,40 @@<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>+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 /* _STRCHRNUL_H_ */<br>-- <br>2.5.0<br></span><br></span></div>