strtok_r: Include features.h and reinstate "restrict".

This commit is contained in:
Augustin Cavalier
2026-01-08 15:48:50 -05:00
parent 5fed29dcb0
commit 7d234f26de
2 changed files with 3 additions and 2 deletions
+1 -1
View File
@@ -54,6 +54,7 @@ local muslSources =
ffsll.c
rand.c
rand_r.c
strtok_r.c
;
SourceHdrs $(muslSources) :
@@ -148,7 +149,6 @@ KernelMergeObject kernel_lib_posix.o :
strspn.c
strstr.c
strtok.c
strtok_r.c
strupr.c
$(muslSources)
@@ -1,6 +1,7 @@
#include <string.h>
#include "features.h"
char *strtok_r(char *s, const char *sep, char **p)
char *strtok_r(char *restrict s, const char *restrict sep, char **restrict p)
{
if (!s && !(s = *p)) return NULL;
s += strspn(s, sep);