diff --git a/src/kernel/libroot/posix/string/Jamfile b/src/kernel/libroot/posix/string/Jamfile index d7914d6521..30c65d37ac 100644 --- a/src/kernel/libroot/posix/string/Jamfile +++ b/src/kernel/libroot/posix/string/Jamfile @@ -10,6 +10,7 @@ KernelMergeObject posix_string.o : <$(SOURCE_GRIST)>strcasestr.c <$(SOURCE_GRIST)>strcat.c <$(SOURCE_GRIST)>strchr.c + <$(SOURCE_GRIST)>strchrnul.c <$(SOURCE_GRIST)>strcmp.c <$(SOURCE_GRIST)>strcpy.c <$(SOURCE_GRIST)>strcspn.c diff --git a/src/kernel/libroot/posix/string/strchrnul.c b/src/kernel/libroot/posix/string/strchrnul.c new file mode 100644 index 0000000000..7e161009b3 --- /dev/null +++ b/src/kernel/libroot/posix/string/strchrnul.c @@ -0,0 +1,19 @@ +/* +** Copyright 2003, Axel Dörfler, axeld@pinc-software.de. All rights reserved. +** Distributed under the terms of the OpenBeOS License. +*/ + + +#include +#include + + +char * +strchrnul(const char *string, int c) +{ + while (string[0] != (char)c && string[0]) + string++; + + return (char *)string; +} +