strchrnul is used in shader_runner.c (and no where else in all of piglit). Unfortunately bionic, Android's c library does not include this function. I've writen an implementation of strchrnul which is only used when compiling for Android.
Signed-off-by: Tom Gall <[email protected]> --- tests/shaders/shader_runner.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/tests/shaders/shader_runner.c b/tests/shaders/shader_runner.c index 20f1ee0..fab7296 100644 --- a/tests/shaders/shader_runner.c +++ b/tests/shaders/shader_runner.c @@ -38,6 +38,26 @@ #include "shader_runner_gles_workarounds.h" +#if defined(__ANDROID__) +/* on Android there is no strchrnul which is used in this test, so we must fill + * in an implementation. + * + * The strchrnul() function is like strchr() except that if c is not found in s, then + * it returns a pointer to the null byte at the end of s, rather than NULL + */ +char * +strchrnul(const char *s, int c) +{ + char * result = strchr(s, c); + + if (result == NULL) { + result = s + strlen(s); + } + + return result; +} +#endif /* __ANDROID__ */ + static void get_required_versions(const char *script_name, struct piglit_gl_test_config *config); -- 1.7.10.4 _______________________________________________ Piglit mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/piglit
