]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
um: drivers: call kernel_strrchr() explicitly in cow_user.c
authorMichael Bommarito <michael.bommarito@gmail.com>
Wed, 8 Apr 2026 07:01:02 +0000 (03:01 -0400)
committerJohannes Berg <johannes.berg@intel.com>
Wed, 8 Apr 2026 07:25:22 +0000 (09:25 +0200)
commit91e901c65b4da02a6fd543e3f0049829ae9645b7
tree88b192e5409ce30cf0b2c6fd6f1e85c43a665664
parent8aae2da6104ab98799b203c10cb3e0bd719fe02b
um: drivers: call kernel_strrchr() explicitly in cow_user.c

Building ARCH=um on glibc >= 2.43 fails:

  arch/um/drivers/cow_user.c: error: implicit declaration of
  function 'strrchr' [-Wimplicit-function-declaration]

glibc 2.43's C23 const-preserving strrchr() macro does not survive
UML's global -Dstrrchr=kernel_strrchr remap from arch/um/Makefile.
Call kernel_strrchr() directly in cow_user.c so the source no longer
depends on the -D rewrite.

Fixes: 2c51a4bc0233 ("um: fix strrchr() problems")
Suggested-by: Johannes Berg <johannes@sipsolutions.net>
Cc: stable@vger.kernel.org
Assisted-by: Claude:claude-opus-4-6
Assisted-by: Codex:gpt-5-4
Signed-off-by: Michael Bommarito <michael.bommarito@gmail.com>
Link: https://patch.msgid.link/20260408070102.2325572-1-michael.bommarito@gmail.com
[remove unnecessary 'extern']
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
arch/um/drivers/cow_user.c