diff options
author | Benjamin Gaignard <benjamin.gaignard@stericsson.com> | 2012-11-01 16:47:43 +0100 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2012-11-08 16:05:49 +0100 |
commit | c88a3c97ff4c5282f689123a0940716a98479888 (patch) | |
tree | a353e1c643d2a65ed07ae6dea6b36a340ab48b20 /tests/modetest | |
parent | 738e81382a7ad92750fb2ff2343075173cbac90b (diff) |
modetest: Add internal strchrnul implementationandroid
bionic doesn't provide strchrnul(), add an internal implementation to
support Android builds.
Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
[Add configure check for strchrnul]
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'tests/modetest')
-rw-r--r-- | tests/modetest/modetest.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/modetest/modetest.c b/tests/modetest/modetest.c index c111c791..a8ba076c 100644 --- a/tests/modetest/modetest.c +++ b/tests/modetest/modetest.c @@ -843,6 +843,15 @@ static char optstr[] = "ecpmfs:P:v"; #define min(a, b) ((a) < (b) ? (a) : (b)) +#ifndef HAVE_STRCHRNUL +static char *strchrnul(const char *s, int c) +{ + while (*s && *s != c) + s++; + return (char *)s; +} +#endif + static int parse_connector(struct connector *c, const char *arg) { unsigned int len; |