Re: [PATCH v1 1/1] string: Export strnchrnul()
From: Ilpo Järvinen
Date: Tue Nov 10 2026 - 14:45:58 EST
On Tue, 10 Nov 2026, Andy Shevchenko wrote:
> Export strnchrnul() for users that may be compiled as modules.
>
> Reported-by: Armin Wolf <W_Armin@xxxxxx>
> Closes: https://lore.kernel.org/r/1969fb5a-38ef-4b4b-9d2f-cb9a4348b968@xxxxxx
> Fixes: 0bee0cece2a6 ("lib/string: add strnchrnul()")
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
> ---
>
> Assumed to go via PDx86 where the first (wow!) module user wants to use it.
Thanks guys,
I'm so surprised by this, sashiko did warn about this so I even checked
myself and saw an export after the closing brace so thought sashiko was
just wrong... Maybe I was looking that the strrchr's export, can't think
of anything else to explain it.
> lib/string.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/lib/string.c b/lib/string.c
> index a3778d5aab4a..cc8982a93afc 100644
> --- a/lib/string.c
> +++ b/lib/string.c
> @@ -352,6 +352,7 @@ char *strnchrnul(const char *s, size_t count, int c)
> s++;
> return (char *)s;
> }
> +EXPORT_SYMBOL(strnchrnul);
>
> #ifndef __HAVE_ARCH_STRRCHR
> /**
>
--
i.