Commit 38adf3d
committed
Fix prototype mismatch of strlen() in libc.h
Commit f95a700 ("Correct return type of strlen function") changed the
return type of strlen() from int32_t to size_t in its definition, but
did not update the prototype in include/lib/libc.h accordingly. This
causes a build failure due to a conflicting type declaration:
CC build/lib/libc.o
lib/libc.c:23:8: error: conflicting types for 'strlen'; have 'size_t(const char *)' {aka 'unsigned int(const char *)'}
23 | size_t strlen(const char *s)
| ^~~~~~
In file included from lib/libc.c:1:
./include/lib/libc.h:73:9: note: previous declaration of 'strlen' with type 'int32_t(const char *)' {aka 'int(const char *)'}
73 | int32_t strlen(const char *s1);
| ^~~~~~
make: *** [Makefile:53: build/lib/libc.o] Error 1
Update the strlen() prototype in the header file to match the new
return type and fix the build error.
Fixes: f95a700 ("Correct return type of strlen function")1 parent 5e891e1 commit 38adf3d
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
73 | | - | |
| 73 | + | |
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
| |||
0 commit comments