For ISO C23, the function strchr that return pointers into their input
arrays now have definitions as macros that return a pointer to a
const-qualified type when the in put argument is a pointer to a
const-qualified type.
Signed-off-by: Rudi Heitbaum <rudi@heitbaum.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Link: https://github.com/kmod-project/kmod/pull/pull/422
Signed-off-by: Lucas De Marchi <demarchi@kernel.org>
int mkdir_parents(const char *path, mode_t mode)
{
- char *end = strrchr(path, '/');
+ const char *end = strrchr(path, '/');
/* no parent directories */
if (end == NULL)