Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

kconfig: use memcmp instead of deprecated bcmp

bcmp() was removed in POSIX.1-2008.

This commit replaces bcmp() with memcmp(). This allows Kconfig to link
with C libraries that do not provide bcmp(), such as Android bionic
libc.

Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
Reviewed-by: Miguel Ojeda <ojeda@kernel.org>
Reported-by: Abhigyan Ghosh <zscript.team.zs@gmail.com>
[masahiro: update commit description]
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>

authored by

Thomas Meyer and committed by
Masahiro Yamada
0a1eab12 e04c78d8

+1 -1
+1 -1
scripts/kconfig/confdata.c
··· 77 77 if (map2 == MAP_FAILED) 78 78 goto close2; 79 79 80 - if (bcmp(map1, map2, st1.st_size)) 80 + if (memcmp(map1, map2, st1.st_size)) 81 81 goto close2; 82 82 83 83 ret = true;